Great! I currently started to answer you.... saves time ;-) regards, Armin
----- Original Message ----- From: "C F" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, July 22, 2003 8:58 PM Subject: Re: Why is OJB requiring autoincrement? > Never mind. I found the problem. I had some stuff > commented out in the middle of my class descriptor > that was hosing things up. I'm not really sure what > happened... it's almost as if it was ignoring the fact > that the stuff was commented out. Everything looked > okay as far as I could tell.... but I took it out and > now it's working fine. > > > --- C F <[EMAIL PROTECTED]> wrote: > > I'm using OJB from CVS 7/13/03 and MySQL with > > SequenceManagerNativeImpl and PB. I have a table > > (A) > > who has an identity column as primary key and a > > related table (B) who's primary key is not an > > identity > > column. Here's some repository xml. > > > > <class-descriptor class="com.acme.A" table="A"> > > <field-descriptor name="a_id" column="a_id" > > jdbc-type="SMALLINT" access="readonly" > > primarykey="true" autoincrement="true"/> > > <field-descriptor name="b_id" column="b_id" > > jdbc-type="SMALLINT"/> > > <reference-descriptor name="b" > > class-ref="com.acme.B" auto-retrieve="true"> > > <foreignkey field-ref="b_id"/> > > </reference-descriptor> > > </class-descriptor> > > > > <class-descriptor class="com.acme.B" table="B"> > > <field-descriptor name="b_id" column="b_id" > > jdbc-type="SMALLINT" primarykey="true"/> > > </class-descriptor> > > > > When I store object A, I get an error unless I add > > autoincrement="true" the b_id field descriptor. But > > it's NOT an autoincrement field. And I don't > > understand why it even cares when I'm only inserting > > object A. > > > > Here's the error: > > > > [DEFAULT] WARN: > > org.apache.ojb.broker.metadata.ClassDescriptor: > > Could > > not find autoincrement attribute for class: > > com.acme.B > > > > P.S. I've seen numerous Armin posts where he > > recommends not using identity columns. > > Unfortunately, > > this a is fundamental part of our DB design so I > > need > > to at least try to make this work :-) > > > > Any ideas? Thanks! > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > > design software > > http://sitebuilder.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
