Aug 15Hibernate: Annotations or XML Mapping?
Until recently, I've always used the XML mapping files to define my persistence model with Hibernate. I was not real keen on the idea of using meta to define persistence in the objects themselves via annotations. However, I decided to give it a shot recently. My main argument had always been that by using the XML mapping, my persistent objects are not tied to Hibernate, exclusively. When I stopped to think about it though, one thought really hit me hard: I don't use any other ORM for my Java code. Why would it matter if the meta for mappings is in the code?
This being said, I wanted to pose a question: Is there a benefit to using annotations over XML mapping (other than JVM compatibility)? Your thoughts in the comments, please.
Posted by: Andrew Powell
Categories: Java , ColdFusion , Spring , Universal Mind , Hibernate , XML
Comments
08/15/08 6:47 PM
08/15/08 10:40 PM
10/19/08 12:51 AM
11/29/08 11:40 PM
12/01/08 11:10 AM