The newly committed test
com.avaje.tests.singleTableInheritance.TestInheritQuery
contains two different ways to query a table with ManyToOne relationship.
1) List locations = Ebean.find(PalletLocation.class).where().eq("zone", zone).findList();
2) List locations = Ebean.find(PalletLocation.class).where().eq("zone.id", zone.getId()).findList();
The second style works, but the first one throws an exception.
The sql generated is wrong (notice the p.null=?):
select p.type, p.ID c0, pz.type c1, p.ZONE_SID c2, p.attribute c3
from pallet_location p
join zones pz on pz.ID = p.ZONE_SID
where p.null = ?
I tracked it down to the DeployPropertyParser where the "zone" property gets resolved but the elProp.getElPrefix() and elProp.getElPlaceholder() are both null.
Strange enough, with oracle it seems the PrepareStatement works (even with the wrong p.null column), but ebean then fails later when it tries to lookup a scalar type for the zone parameter when binding it. But this seems to be a consecutive fault.