Fix for #173 - Ability to use a MappedSuperClass without being enhanced as long as it doesn't have persistent fields

This commit is contained in:
rbygrave
2014-07-19 17:49:03 +12:00
parent 2dca1bdf5b
commit 0c4fc4eea3
11 changed files with 165 additions and 61 deletions
@@ -0,0 +1,29 @@
package com.avaje.ebeaninternal.server.deploy;
import org.junit.Assert;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.tests.model.basic.ResetBasicData;
import com.avaje.tests.model.mappedsuper.ASimpleBean;
public class TestNotEnhancedMappedSuper extends BaseTestCase {
@Test
public void simpleBean_mappedSuperNotEnhanced_ok() {
// //GlobalProperties.put("ebean.search.packages", "com.avaje.tests.model.mappedsuper");
ResetBasicData.reset();
ASimpleBean bean = new ASimpleBean();
bean.setName("junk");
Ebean.save(bean);
Assert.assertNotNull(bean.getId());
}
}