I'm trying to deploy an application with alter-table set, to update the tables in my
database, but I get this error message:
ALTER TABLE only allows columns to be added that can contain nulls or have a DEFAULT
definition specified. Column 'ol_version' cannot be added to table 'STOCK' because it
does not allow nulls and does not specify a DEFAULT definition.
The definition for optimistic locking in my jbosscmp-jdbc.xml look like this:
<optimistic-locking>
<version-column/>
<field-name>versionField</field-name>
<column-name>ol_version</column-name>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</optimistic-locking>
How can I define a default value of e.g 0?
/TK
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3851416#3851416
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3851416
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user