Fix for #135 Make Model abstract, change db() and db(server) to be

static methods.
This commit is contained in:
Rob Bygrave committed 2014-05-30 01:30:57 +12:00
1 parent f4dceb97b0
commit b1de821817
2 files changed
+36 -4

No files matched your search

@@ -18,6 +18,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.avaje.ebean.BackgroundExecutor;
import com.avaje.ebean.Model;
import com.avaje.ebean.RawSql;
import com.avaje.ebean.RawSqlBuilder;
import com.avaje.ebean.annotation.ConcurrencyMode;
@@ -1411,6 +1412,10 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
// we got to the top of the inheritance
return;
}
if (Model.class.equals(superclass)) {
// top of the inheritance. Not enhancing Model at this stage
return;
}
if (!EntityBean.class.isAssignableFrom(superclass)) {
throw new IllegalStateException("Super type "+superclass+" is not enhanced?");
}