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. 【模板】强连通分量和tarjan算法

    看了好久才终于明白了这个算法..复杂度是O(n+m). 我觉得这个算法不是很好理解,但是看懂了以后还是觉得听巧妙的. 下面给出模板代码和三组简单数据帮助理解. 代码如下: #include <s ...

  2. Zookeeper系列(十一)zookeeper的Leader选举详解(核心之一)

    作者:leesf    掌控之中,才会成功:掌控之外,注定失败. 出处:http://www.cnblogs.com/leesf456/p/6107600.html尊重原创,奇文共欣赏: 一.前言 前 ...

  3. 解决phpStorm使用vue提示"Attribute v-xxx is not allowed here"的问题

    jetbrains家族的新版webStorm.phpStorm等工具都已支持vue,不需要自己再安装Vue.js插件,对vue单文件组件支持挺好.但是在html文件中直接<script>引 ...

  4. Netfilter 之 iptable_mangle

    初始化 iptable_mangle_table_init函数通过调用ipt_register_table完成mangle表注册和钩子函数注册的功能:该流程与iptable_filter的函数调用的函 ...

  5. Download google drive public shared file in terminal

    http://unix.stackexchange.com/questions/136371/how-to-download-a-folder-from-google-drive-using-term ...

  6. koa 项目打包(使用webpack打包koa2 框架app)

    关键问题 一:所有node_modules里的模块都不进行打包 webpack的核心功能是将引用的各个模块打到一个文件里,并会将各种规范的模块进行统一的模块化处理(webpack规范). 然而node ...

  7. 1.2 位于Shell脚本第一行的#!

    学习<shell脚本学习指南>一书,记录总结,便于自己回忆,希望对你有帮助! 2.4 自给自足的脚本:位于第一行的 #! 1.Shell脚本执行过程 当Shell执行一个程序时,会要求UN ...

  8. 3.ibatis4种事务类型浅析

    ibatis中Transaction有四个实现类 其中spring的SqlMapClientFactoryBean类中 private Class transactionConfigClass = E ...

  9. TP5连接数据库和phpstrom连接数据库(宝塔面板数据库连接)

    1.编译器:phpstrom 框架:TP5 服务器面板:宝塔面板 2.我遇到的核心问题:数据库.用户名.密码均正确但是无法连接, 使用宝塔面板的都知道phpmyadmin的端口号是888,注意注意这个 ...

  10. Android数据存储的方式

    1. 内部存储    * 路径:  /data/data/包名/    * cache用于存储临时文件,系统内存不足时,清除缓存数据    * files用于存储重要的文件,要用户手动在应用程序列表清 ...