i now got my hands on the book "Hibernate in Action" and i read the part named "Understanding object identity". There they tell me, that Long has been chosen to match the type of identity value produced by native identifier generator. Sounds like i can safely assume that Long is always the best choice when using hibernate (for a new project, no legacy involved, no need to make compromise)? It would be awesome if someone could just give me that nice feeling of beeing sure. In addition i dont want to hook the framework to hibernate. So maybe therefor its better to make the identity type generic?
Does really nobody knows an answer to my question? I thought this kind of stuff is basic and had been dealt with many times before. I justed want an expierenced opinion because i really dont know, even after studying 4 (!!!) hibernate books + the reference guide + search in the forums and google, which is kind of useless when searching for "hibernate id choose", because of to many hits.
regards, garz
|