MCPcopy Create free account
hub / github.com/ebean-orm/ebean / save

Method save

ebean-api/src/main/java/io/ebean/DB.java:301–303  ·  view source on GitHub ↗

Either Insert or Update the bean depending on its state. If there is no current transaction one will be created and committed for you automatically. Save can cascade along relationships. For this to happen you need to specify a cascade of CascadeType.ALL or CascadeType.PERSIST on the OneToMa

(Object bean)

Source from the content-addressed store, hash-verified

299 * will be set against each order detail when it is saved.
300 */
301 public static void save(Object bean) throws OptimisticLockException {
302 getDefault().save(bean);
303 }
304
305 /**
306 * Insert the bean. This is useful when you set the Id property on a bean and

Callers 15

testOtherOneMethod · 0.95
naturalKey_inPairsMethod · 0.95
naturalKey_inTuplesMethod · 0.95
insertTestDataMethod · 0.95
insert_and_findMethod · 0.95
testMethod · 0.95
beginMethod · 0.95
testMultiSave1Method · 0.95
testMultiSave2Method · 0.95

Calls 2

getDefaultMethod · 0.95
saveMethod · 0.65

Tested by 15

testOtherOneMethod · 0.76
naturalKey_inPairsMethod · 0.76
naturalKey_inTuplesMethod · 0.76
insertTestDataMethod · 0.76
insert_and_findMethod · 0.76
testMethod · 0.76
beginMethod · 0.76
testMultiSave1Method · 0.76
testMultiSave2Method · 0.76