• Post Reply Bookmark Topic Watch Topic
  • New Topic

mixture of annotation and xml based hibernate code  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does hibernate support mixed code with some using annotation based java class (with filed annotated to columns and relationships) and some using xml based configuration ?
 
Sheriff
Posts: 21378
92
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Definitely. The JPA spec itself mandates that this is possible. In fact, XML is the only way to override mappings defined in annotations (like the generator used for @GeneratedValue).
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!