This one time, at band camp, [EMAIL PROTECTED] said:
>I was able to create duplicate objects (two objects with the same id, which
>maps to a primary key field in my database). I have specified this field by
>using the identity field in the class attribute of my mapping.xml file. I
>was under the impression that this would prevent this from happening. Am I
>missing something? Thanks,
Ray,
It is totally legal to create more than one object with the same id. The
only thing that would prohibit this is the use of a GUID (Globally Unique
ID) generator to create object ids or a unique contraint on the primary
key field in the database schema.
Castor provides the HIGH/LOW key generator with the global=true
attribute. This will generate GUIDs for your objects. Additionally,
other GUID generators can be plugged into Castor via the castor.properties.
Hope this helps.
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev