I have started a new project with Hibernate. Is Hibernate annotation a better choice or is Hibernate XML mapping better?
I have used Hibernate with XML configuration, but I have no idea about annotation.
- are there any issues while going for annotation based implementation?
- is maintenance of an application easier or more complicated with annotation based?
- which one is better (that is, annotation or XML mapping) and which one is is widely used? Why?
- If I use a different database at a different level, that is, production or integration or development level, do I need to go for change of code?
Note: I am not comparing two technologies, but I want to know which one (that is, out of two ways) to be used in the application with the latest technology.