Why is it important? what are advantage according to XML mapping? Can you explan these? thank you.
相关问题
- Illegal to have multiple roots (start tag in epilo
- Newtonsoft DeserializeXNode expands internal array
- how to use special characters like '<'
- XML - XSLT - document() function inside count() fu
- convert logback.xml to log4j.properties
相关文章
- Creating XML Elements without namespace declaratio
- Get Attribute Value From Simple XML Using JQuery /
- Hibernate Tutorial - Where to put Mapping File?
- Spring: controller inheritance using @Controller a
- Hibernate doesn't generate cascade
- Setup and Tear Down of Complex Database State With
- Directly signing an Office Word document using XML
- When sending XML to JMS should I use TextMessage o
It is not something important as in "mandatory". It's a different possibility, with strength and weaknesses.
Advantages:
I don't understand all the hype around annotation and I prefer HBM for the following reasons (These reasons overrule the disadvantages like typos, compile time check for me):
If HBMs are well organized (one HBM per java class, consistent naming) it becomes easy to navigate between the two. Junit test and some discipline will remove the need for compile time check. As for defaults, I think if hibernate can work no annotaions at all it should be able to work with no XML at all (conceptually - dont know if this is reality)