This content has been marked as final.
Show 6 replies
-
1. Re: Update on Find
aloubyansky Mar 17, 2004 4:08 AM (in response to burg)Any more details on what you and JBoss [your version] did?
-
2. Re: Update on Find
gold Mar 17, 2004 5:30 AM (in response to burg)"loubyansky" wrote:
Any more details on what you and JBoss [your version] did?
I do experience the issue accessing DB2 DATE field via CMP EB.
Jboss 3.2.3.
It seems Jboss CMP module makes the difference between the value retrived from the DB and the value stored in the CMP field.
Why? Do you think something wrong with standardjbosscmp-jdbc.xml datatype mapping?
Code:
Fake f = FakeHome.findByPrimaryKey(new Long(XXX));
f.getDate(); // note the Date should be not null to reproduce the issue
Date field:
public abstract java.sql.Date getDate();
Log:
2004-03-17 12:37:07,578 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.FakeCMP#findByPrimaryKey] Executing SQL: SELECT FAKE_ID FROM FAKE WHERE FAKE_ID=?
2004-03-17 12:37:07,578 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.FakeCMP] Executing SQL: SELECT DATE FROM FAKE WHERE (FAKE_ID=?)
2004-03-17 12:37:07,593 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.FakeCMP] Executing SQL: UPDATE FAKE SET DATE=? WHERE FAKE_ID=?
2004-03-17 12:37:07,593 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.FakeCMP] Rows affected = 1 -
3. Re: Update on Find
gold Mar 17, 2004 5:51 AM (in response to burg)<check-dirty-after-get>false</check-dirty-after-get>
-
4. Re: Update on Find
aloubyansky Mar 17, 2004 6:52 AM (in response to burg)Correct. It is fixed in 3.2.4.
-
5. Re: Update on Find
mkyaj Mar 17, 2004 4:50 PM (in response to burg)By default, JBoss will do updates of any dirty entities whenever a finder is called. With sync-on-commit-only set to true, however, this synchronization will still happen when deletes/removes are done to ensure that cascade deletes work correctly.
So you have to set <sync-on-commit-only>true</sync-on-commit-only>
in conf\standardjboss.xml. -
6. Re: Update on Find
gold Mar 18, 2004 3:58 AM (in response to burg)"mkyaj" wrote:
By default, JBoss will do updates of any dirty entities whenever a finder is called. With sync-on-commit-only set to true, however, this synchronization will still happen when deletes/removes are done to ensure that cascade deletes work correctly.
So you have to set <sync-on-commit-only>true</sync-on-commit-only>
in conf\standardjboss.xml.
Thanks a lot... But it doesn't work. Waiting for 3.2.4.