Enhancement 198 : ENHANCEMENT: Add direct update method to ebeanServer
Priority 
Medium
Reported Version 
 
Logged By 
Ilya Skorik
Status 
Fixed
Fixed Version 
2.4.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
04/01/2010
Updated 
04/01/2010
Type 
Enhancement
 
Attachments 
No attachments

Object object = new Object();
object.setTitle("test");
object.setEnabled(true);

ebeanServer.create(object);

>>object.setEnabled(false);
ebeanServer.update(object);<<

 
Rob 11 Jan 11:07
I'm not 100% sure about this...

I'm not sure as this relates to a specific case:

- not using enhancement
- bean has no version property/column

This results in updates with no optimistic concurrency checking - which is no really ideal.

Also note that as an alternative approach for beans with no version column is to check for a non-null id property (and choose to update when a non-null id property exists).

... but firstly it should be noted that it is highly desired that there is a version property to get efficient optimistic concurrency checking.

Rob 20 Jan 08:45
Fixed in HEAD

This is FIXED in HEAD.

That is there is now an update() method added to Ebean and EbeanServer.

woResponse

Upload a file