I've tracked down the first problem related to the QueryException based on not being able to find your rev_type (aka REVTYPE) field. Based on your mappings, you're using a mapping that the collection metadata producer does not yet support, so we need to look at what changes are necessary to support this. The root problem here is based on an assumption that the revision type property is mapped the same on both the map-key and map-value. In your use case, the field is mapped as a property on Item but is mapped as part of the primary key on category_item_AUD. So when the predicate is added, it uses an incorrect property reference on the Item side and threfore leads to the QueryException. This is shown clearly below:
with the problem being the line
e__.originalId.rev_type != :delrevisiontype and
While your use case points out the problem with TwoEntityQueryGenerator, this is also likely problematic with ThreeEntityQueryGenerator too. Once we get past this, I'll look into the null-values problem and likely push that to follow-up JIRA if they're not related. |