Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Schema level mapping annotations  RSS feed

Sudhanshu Mishra
Ranch Hand
Posts: 238
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I was going through the JSR-317 and I stumbled across this statement:

Such schema-level mapping annotations must be specified on the owning side of the relationship. Any
overriding of mapping defaults must be consistent with the relationship modeling annotation that is
specified. For example, if a many-to-one relationship mapping is specified, it is not permitted to specify
a unique key constraint on the foreign key for the relationship.

But Many-to-One side IS the owner, then why can it not modify the uniqueness of Foreign Key?

I am new to JPA .Please help me with the basic concepts.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!