OJB can only provide autoincrmeneted PK values if there is at leat one
field declared as primary key *and* as autoincremented. Please refer to
the tutorials for details.
This is unit tested functionality !
[EMAIL PROTECTED] wrote:
> hi!
> when i create a new object and store it, the object doesn't contain the new
> oid after storing. this causes the problem, that after a second store, the
> object will be stored again and exists with 2 different oids in the
> database. i tried to overwrite
>
> private void writeObject(java.io.ObjectOutputStream out) throws IOException
>
> in my persistent superclass and call
> if (oid == null)
> {
> new Identity(this);
> }
>
> this causes serious troubles in PersistenceBrokerImpl (npe's).
>
> is there a default strategy to get the oid filled. shouldn't this be done
> by ojb (i use the PersistenceBroker API, no ODMG).
>
> i'm using ojb 0.9.5
>
>
> Juergen
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>