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]