Hi, I use JBoss 4.0 Optimistic locking with optimistic-locking element content model "version column". If the version column is not a property of the entity bean jboss generates correct sql statement:
UPDATE Person SET Name=?, Version=? WHERE ID=? AND Version=? param: i=1, type=VARCHAR, value=Test param: i=2, type=INTEGER, value=109 param: i=3, type=INTEGER, value=1 param: i=4, type=INTEGER, value=108 If the version column is a property of the entity bean jboss generates correct sql statement but an incorrect parameter list: UPDATE Person SET Name=?, Version=? WHERE ID=? AND Version=? param: i=1, type=VARCHAR, value=Test some parameter (primary key and version no.) are missing! This happens only if the value of version column is not changed during the transaction. If I set a different value to the version column property like setVersion(10) the sql statement is generated correct. But this is a second strange behaviour. If a column is a version column jboss should override all changes and set it's own increased version value (109 in the example above). Can anybody explain this behaviour or is it a bug? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3857521#3857521 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3857521 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user