Hi Jerome,

just add single line as follows:

> -----Urspr�ngliche Nachricht-----
> Von: PICARD J�r�me [mailto:jpicard@;aston.fr]
> Gesendet: Freitag, 8. November 2002 13:03
> An: Ojb-User (E-mail)
> Betreff: Help: OID in C/S mode.
> 
> 
> Hi all,
> 
> I am using OJB 0.9.7 in C/S mode.
> 
> Is it possible to retrieve the value of the primary key of an 
> object after
> an insert ?
> 
> In this code, the value of the primary key is allways 0.
> 
> Have you an idea ?
> 
>                       broker.beginTransaction();      
>                               
>                               
>                               Client objClient = new Client();
>                                        objClient.setLogin("Login 1" );
>                                        objClient.setNom("Nom 1" );
>                                        
objClient.setPrenom("Prenom 1");
>                                        objClient.setPassword("Password
> 1");
>       
                        // compute identity beforehand
                        new Identity(objClient);
                
>                               
>                               broker.store(objClient);
>                               
>                                                               
>                               log.info("Identifiant : " +
> objClient.getId()); // Identifiant : 0
>                               
>               
>                       broker.commitTransaction();
> 


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to