Hi http://www.mail-archive.com/[email protected]/msg10447.html On Tue, 2004-12-21 at 18:10 +0100, BOUESSAY Christian wrote: > Hi, > > We're using a database sequence manager ; when we insert an object, the next > value of sequence is found; but how could we get the value of id? > > for instance: > /** > * @ojb.class table="TableA" > * determine-extents="false" > */ > Class A { > /** > * @ojb.field primarykey="true" > * autoincrement="database" > * sequence-name="mySeq" > */ > int id ; > > String creator; > //... > } > > /** > * @ojb.class table="tableB" > * include-inherited="false" > * > * @ojb.field name="id" > * jdbc-type="INTEGER" > * primarykey="true" > * > * @ojb.reference class-ref="....A" > * auto-retrieve="true" > * auto-update="true" > * auto-delete="true" > * foreignkey="id" > */ > Class B extends A { > String attr; > // ... > } > > > B obj = new B(); > obj.setAttr("blabla..."); > obj.store(); > > String id = obj.getId(); > > //-----------------> id is null, but maSeq.nextval was called ... > > > We found that access is set to "readonly" for A and "anonymous" for B in > 'repository_user.xml'. > And we would like to set these values to "readwrite"; how to do it? > (the annotation access="readwrite" doesn't work with others parameters ...) > > Thanks. > > Christian BOUESSAY > -- Nouguier Olivier <[EMAIL PROTECTED]>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
