how to specify objectId for new object

From: Bryan Lewis (brya..aine.rr.com)
Date: Sat May 01 2004 - 15:18:58 EDT

  • Next message: Eric Schneider: "Re: how to specify objectId for new object"

    Most of the time we want a new object to get an auto-generated objectId, coming
    from an Oracle sequence table for example. But what if we (rarely) want to let
    the user specify the new object's id?

    I haven't been able to figure out how to set a new object's id. After looking
    through the docs, I tried setObjectId() and setReplacementId(), both before and
    after the initial commit of the object. All I've gotten is null-primary-key
    exceptions. Is this doable? Thanks.



    This archive was generated by hypermail 2.0.0 : Sat May 01 2004 - 15:19:08 EDT