Hi,
When does the CMP issue UPDATE statement to DB? Suppose I have 10 fields in a table and I am modifing a record. I will issue the set methods for each column. Will the CMP issue UPDATE statement for each set method or 1 single UPDATE statement to update all the fields?
If it is separate UPDATE statements for each set method, is there any way that I tell the CMP to update all the fields in one single UPDATE statement? Please let me know.
Thanks in advance,
Prasanna Kumar
-
CMP - Updating to DB (1 messages)
- Posted by: Prasanna K
- Posted on: September 17 2004 03:40 EDT
Threaded Messages (1)
- CMP - Updating to DB by Arun Nair on September 17 2004 11:54 EDT
-
CMP - Updating to DB[ Go to top ]
- Posted by: Arun Nair
- Posted on: September 17 2004 11:54 EDT
- in response to Prasanna K
In Ejb 1.1 "is-modified-method-name" was used to check the fields have been modified and the container used to make one ejbStore() to save changed data. But isModified() is no longer required for 2.0 CMP entity EJBs based on the EJB 2.0 specification. However, it still applies to BMP and 1.1 CMP EJBs.
When you deploy EJB 2.0 entity beans with cmp, app Server automatically detects the fields that were modified, and write/update only those fields.
This is very much correct with weblogic server and I hope all other servers would be doing the same.