Re: Using "relationship != null" qualifier with ObjEntity Inheritance

2008-08-06 Thread Andrus Adamchik
Here is a more detailed answer. A case when a criteria for a subclass / superclass is based on a presence of a given relationship is better addressed with vertical inheritance - something we'll be adding in 3.0. Single table inheritance mapping requires a criteria based on one or more colum

Re: Using "relationship != null" qualifier with ObjEntity Inheritance

2008-08-06 Thread Andrus Adamchik
On Aug 6, 2008, at 2:54 PM, Dave Dombrosky wrote: Do I have to add another column just to hold the type like the documentation example shows? Not the best solution in this case, but I guess it can be done if need be. That would certainly work. Andrus

Re: Using "relationship != null" qualifier with ObjEntity Inheritance

2008-08-06 Thread Dave Dombrosky
Oh boy. What do you recommend in the meantime? Do I have to add another column just to hold the type like the documentation example shows? Not the best solution in this case, but I guess it can be done if need be. -Dave On Wed, Aug 6, 2008 at 2:47 PM, Andrus Adamchik <[EMAIL PROTECTED]> wrote

Re: Using "relationship != null" qualifier with ObjEntity Inheritance

2008-08-06 Thread Andrus Adamchik
Ok, I see. This indeed is a limitation of the inheritance algorithm. We can't evaluate the inheritance qualifier expression in-memory in this case. We can probably improve on that in the future, but there is no easy fix. Andrus On Aug 6, 2008, at 2:29 PM, Dave Dombrosky wrote: Yes it is

Re: Using "relationship != null" qualifier with ObjEntity Inheritance

2008-08-06 Thread Dave Dombrosky
Yes it is just a 1:1 mapping on the relationship. Here is the stack trace: org.apache.cayenne.exp.ExpressionException: [v.3.0-SNAPSHOT Aug 01 2008 19:55:10] Error evaluating expression 'db:some_relationship != null' at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:331

Re: Using "relationship != null" qualifier with ObjEntity Inheritance

2008-08-06 Thread Andrus Adamchik
Could you post a bigger part of the stack trace (at least everything that has org.apache.cayenne in it)? From what I can see, this is related to in-memory evaluation of the qualifier. If that's a to-one relationship based on FK, intuitively this should work, but it probably hits a limitatio

Using "relationship != null" qualifier with ObjEntity Inheritance

2008-08-05 Thread Dave Dombrosky
I am currently trying to use ObjEntity Inheritance in my project, but I am running into some difficulties. I was hoping that I could use "someRelationship != null" as the qualifier, but I get the following error when trying to run the code: org.apache.cayenne.exp.ExpressionException: [v.3.0-SNAPS