posted 12 years ago
Hallo,
I have to write a Hibernate application on a semi-standalone client with a postgresql database on it.
If you want you may sync the database with the server site.
Problem which occured is:
Client one creates a new entity, client two creates a new entity of the same class. Both have the same ID when uploading to the server.
My sollution now was to use a master Id field for the server side id and a id field for the clients.
Problem now: How to tell hibernate with annotations which Id field to use for which connection?
If its not possible, is it good practice to use xml based mapping mixed with annotations?
Thanks
Please correct my English.