Fix for TestStatelessUpdate.testWithoutChangesAndVersionColumnAndIgnoreNullValues

This commit is contained in:
Rob Bygrave
2014-04-23 03:27:39 +12:00
parent 0d2101ca7c
commit 1451ec0084
3 changed files with 7 additions and 2 deletions
@@ -155,6 +155,10 @@ public final class DefaultPersister implements Persister {
public void forceUpdate(EntityBean entityBean, Transaction t, boolean deleteMissingChildren) {
PersistRequestBean<?> req = createRequest(entityBean, t, null, PersistRequest.Type.UPDATE);
if (req.isReference()) {
// skip update as only got the Id property set
return;
}
req.setStatelessUpdate(true, deleteMissingChildren);
try {
req.initTransIfRequired();
@@ -64,7 +64,7 @@ public class TestStatelessUpdate extends BaseTestCase {
// act
EBasic basicWithoutChanges = new EBasic();
basicWithoutChanges.setId(basic.getId());
server.update(basicWithoutChanges, null, null, true, false);
server.update(basicWithoutChanges);
// assert
// Nothing to check, simply no exception should occur
@@ -93,7 +93,7 @@ public class TestStatelessUpdate extends BaseTestCase {
// act
Customer customerWithoutChanges = new Customer();
customerWithoutChanges.setId(customer.getId());
server.update(customerWithoutChanges, null, null, true, false);
server.update(customerWithoutChanges);
Customer result = Ebean.find(Customer.class, customer.getId());
@@ -1,5 +1,6 @@
package com.avaje.tests.update;
import org.junit.Assert;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;