Example 1:

    // In Customer class:

    @ManyToMany
@JoinTable(name="CUST_PHONES")
public Set<PhoneNumber> getPhones() { return phones; } // In PhoneNumber class: @ManyToMany(mappedBy="phones")
public Set<Customer> getCustomers() { return customers; } Example 2: // In Customer class: @ManyToMany(targetEntity=com.acme.PhoneNumber.class)
public Set getPhones() { return phones; } // In PhoneNumber class: @ManyToMany(targetEntity=com.acme.Customer.class, mappedBy="phones")
public Set getCustomers() { return customers; } Example 3: // In Customer class: @ManyToMany
@JoinTable(name="CUST_PHONE",
joinColumns=
@JoinColumn(name="CUST_ID", referencedColumnName="ID"),
inverseJoinColumns=
@JoinColumn(name="PHONE_ID", referencedColumnName="ID")
)
public Set<PhoneNumber> getPhones() { return phones; } // In PhoneNumberClass: @ManyToMany(mappedBy="phones")
public Set<Customer> getCustomers() { return customers; }

Annotation Type ManyToMany->>>>>Oracle的更多相关文章

  1. 项目重新部署后报The attribute required is undefined for the annotation type XmlElementRef

    在另外一台机器上部署项目,项目导进Eclipse中发现有异常 public class BooleanFeatureType extends FeatureBaseType{ @XmlElementR ...

  2. Annotation Type @bean,@Import,@configuration使用--官方文档

    @Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented public @interface Bean ...

  3. The attribute required is undefined for the annotation type XmlElementRef

    异常描述: 几天没用的项目导进Eclipse中发现有异常 public class BooleanFeatureType extends FeatureBaseType{ @XmlElementRef ...

  4. Annotation Type EnableTransactionManagement

    http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/transaction/annotation/Ena ...

  5. junit的Test不能使用,报错信息:Test is not an annotation type

    在使用junit的Test做测试时,注解@Test报错”Test is not an annotation type”,发现是因为测试类的类名命名为了Test,所以导致错误. 测试类类名不能直接命名为 ...

  6. Java注解annotation : invalid type of annotation member

    前言 首先,关于注解的介绍就不多描述了,网上有很多这方面的资料.本文主要是介绍如何处理标题中遇到的问题:invalid type of annotation member ? 正文 Annotatio ...

  7. 转载:oracle 自定义类型 type / create type

    标签:type create oracle object record 一:Oracle中的类型有很多种,主要可以分为以下几类: 1.字符串类型.如:char.nchar.varchar2.nvarc ...

  8. The type javax.ws.rs.core.MediaType cannot be resolved. It is indirectly referenced from required .class files

    看到了http://stackoverflow.com/questions/5547162/eclipse-error-indirectly-referenced-from-required-clas ...

  9. Java Annotation 机制源码分析与使用

    1 Annotation 1.1 Annotation 概念及作用      1.  概念 An annotation is a form of metadata, that can be added ...

随机推荐

  1. node和npm版本引起的安装依赖和运行项目失败问题

    问题:node版本不同导致的安装依赖版本不同而无法启动 https://www.jianshu.com/p/c07293c8c6d4 实际上问题分为两个部分: 1,npm包管理器安装依赖不成功,此时需 ...

  2. HA 模式 Hadoop+ZooKeeper+Hbase启动顺序

    一. 背景(原http://blog.csdn.net/u011414200/article/details/50437356 ,对其进行了一定更改) 1.1 网络上的大部分教程 都是机器间含有SSH ...

  3. Flume-概述

    Flume 是 Cloudera 提供的一个高可用的,高可靠的,分布式的海量日志采集.聚合和传输的系统.Flume 基于流式架构,灵活简单. Flume最主要的作用就是,实时读取服务器本地磁盘的数据, ...

  4. 【log4j】log4j.properties 文件示例

    # 下面的文件内容是写程序长期要用的,放在这里留个底#Output information(higher than INFO) to stdout and file.info/debug/error ...

  5. 对String的内存解析

    @Test public void stringTest(){ /* * str1和str2地址指向字符串常量池 * 解析: str1 在字符串常量池中创建出java 地址例如为:0x456 * st ...

  6. 注解方式实现AOP编程

    步骤: 1) 先引入aop相关jar文件           (aspectj  aop优秀组件) spring-aop-3.2.5.RELEASE.jar   [spring3.2源码] aopal ...

  7. Ubuntu16.04中VirtualBox中安装FreeBSD

    获取镜像 FreeBSD官网:https://www.freebsd.org,打开后即可看到“Download Freebsd”的按钮,点击进去 进入版本选择的页面.可以看到当前RELEASR版本,旧 ...

  8. Vue.js父子组件如何传值 通俗易懂

    父子组件传值原理图 一般页面的视图App.vue应为这样 一.父组件向子组件传值 1.创建子组件,在src/components/文件夹下新建一个Child.vue 2.Child.vue的中创建pr ...

  9. Scala API - 泛型

  10. Spring源码整理

    转载:https://www.cnblogs.com/ITtangtang/p/3978349.html  感谢博主