When basing an @Entity on a database view instead of a table. Get a NPE.
Exception in thread "main" java.lang.NullPointerExceptionat com.avaje.ebean.server.deploy.DeployPropertyParser.convertWord(DeployPropertyParser.java:34)at com.avaje.ebean.server.deploy.DeployParser.parse(DeployParser.java:50)at com.avaje.ebean.server.query.CQueryPredicates.parsePropertiesToDbColumns(CQueryPredicates.java:279)at com.avaje.ebean.server.query.CQueryPredicates.prepare(CQueryPredicates.java:262)at com.avaje.ebean.server.query.CQueryBuilder.buildQuery(CQueryBuilder.java:153)at com.avaje.ebean.server.query.DefaultOrmQueryEngineHelper.findMany(DefaultOrmQueryEngineHelper.java:77)at com.avaje.ebean.server.query.DefaultOrmQueryEngine.findMany(DefaultOrmQueryEngine.java:93)at com.avaje.ebean.server.core.QueryRequest.findList(QueryRequest.java:172)at com.avaje.ebean.server.core.DefaultServer.findList(DefaultServer.java:989)at com.avaje.ebean.query.DefaultOrmQuery.findList(DefaultOrmQuery.java:394)at TestEbean.main(TestEbean.java:11)java.lang.NullPointerExceptionat com.avaje.ebean.server.autofetch.DefaultAutoFetchManager.updateTunedQueryInfo(DefaultAutoFetchManager.java:332)at com.avaje.ebean.server.autofetch.DefaultAutoFetchManager.collectUsageViaGC(DefaultAutoFetchManager.java:302)at com.avaje.ebean.server.autofetch.DefaultAutoFetchManager.shutdown(DefaultAutoFetchManager.java:270)at com.avaje.ebean.server.core.DefaultServer$Shutdown.run(DefaultServer.java:217)at com.avaje.ebean.server.lib.ShutdownManager.shutdown(ShutdownManager.java:169)at com.avaje.ebean.server.lib.ShutdownHook.run(ShutdownHook.java:47)
The issue looks to be with com.avaje.ebean.server.lib.sql.TableSearch
Specifically String[] TABLE_TYPES = { "TABLE", "VIEW" }; did not include "VIEW" so only searched the dictionary for "TABLE" table types.
Changing this means the dictionary search will find VIEW's as well as TABLE's.
NOTE: With views some things that are automatically detected for tables such as primary keys and foreign key relationships etc need to be manually defined. There may be outstanding bugs where using a view generates a confusing error compared with using a table.
Fixed in 1.0.1