I created an (read-only) entity which just uses sql to gather the data from the database, no table name specified for the entity.
The new naming code will NPE when determining a sequence name.
This patch will fix it:
Index: ../ebean/src/com/avaje/ebean/server/deploy/BeanDescriptorFactory.java===================================================================--- ../ebean/src/com/avaje/ebean/server/deploy/BeanDescriptorFactory.java (revision 156)+++ ../ebean/src/com/avaje/ebean/server/deploy/BeanDescriptorFactory.java Wed Mar 04 13:18:59 CET 2009@@ -637,7 +636,7 @@ } } - if (supportsSequences) {+ if (supportsSequences && desc.getBaseTable() != null) { // Derive the SequenceNextVal and set it to the descriptor. // Note: the sequence only gets used *IF* the value of the // id property is null when inserted. This is the default
I intentionally check for baseTabel at a high level as I think using sequences with sql-only based entities does not make much sense, does it?
I had fixed the NPE later down in my NamingConvention implementation... but I think you are correct... and making this change is a better approach (for people developing their own naming convention implementations).
Fixed in HEAD.