users@glassfish.java.net

Re: Basic JPA Question

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Oct 2007 09:47:17 PDT

My biggest problem with generated ID's, though, is that it is hard to do merge's with them without working it out programatically (as marina pointed out) because there isn't a way to replace the old objects with the new ones because they won't share the same pk.

What do you think of a mechanism where I am completely in control of creating primary keys and making them unique? For example, I KNOW each server ID will be unique and I KNOW each cpu ID will be unique within it's server so that I can just assigned a pk id to the cpu of "serverID+cpuID" (ie "A1", "A2", etc)...
[Message sent by forum member 'wfsaxton' (wfsaxton)]

http://forums.java.net/jive/thread.jspa?messageID=240982