What I need is to switch between the ids but it doesn't work as i figured.
if I run this i got the exception:
org.hibernate.AnnotationException: No identifier specified for entity: eu.gdimbh.cardea.database.entity.DataCategory
I read somewhere that it is possible to mix annotation and xml. But either that is not true or I am doing something wrong.
I hope i am doing something wrong cause i got no other idea how to switch through ids.
Thanks in advance.
EDIT: Got it solved.
Mapping was wrong.
and it seems to work.
Edit 2: For future reference. Dump this approach and use uuids. If anyone won't get a better idea.
Please correct my English.
subject: Id problem in annotation based mapping when using xml based id.