That is the default value which we have tried also. The underlying problem is that OBJ is sending the column with data in the insert SQL to the database because it is an attribute of the class. The temp workaround I've done so far is to mod org.apache.ojb.broker.accesslayer.sql.SqlInsertStatement and org.apache.ojb.broker.accesslayer.StatementManager to not include any autoincrement columns in the SQL for inserts. Seems to work for us at the moment but would rather not have to hack OJB to get around this issue.
-----Original Message----- From: Gelhar, Wallace J. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 12:06 PM To: OJB Users List Subject: RE: Handling DB Auto-Numbering I may remember wrong, but don't you need a autoincrement="false"? Wally -----Original Message----- From: Shannon Ewing [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 10:17 AM To: 'OJB Users List' Subject: RE: Handling DB Auto-Numbering Gave it a try and it still did not work. OJB always sends the column name and value (now null) in the SQL statement to the database. Null is a value for the column so the database rejects the insert. Is there a way to mark a column in the repository so that it is not included for inserts (maybe in a future release)? Basically have another attribute for the field-descriptor that flags the column. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 5:01 AM To: OJB Users List Subject: Re: Handling DB Auto-Numbering Hi, <snip/> > <field-descriptor > id="1" > name="ndx" > column="ndx" > jdbc-type="INTEGER" > primarykey="true"/> > > Any ideas on how to pull this off? I'm far from an OJB expert, but could a nullable="true" help ? Guillaume --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] +---------------------------------------------------------+ This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. +---------------------------------------------------------+ --------------------------------------------------------------------- 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] +---------------------------------------------------------+ This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. +---------------------------------------------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
