cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Razumovsky Andrey <>
Subject Re: Expressions & objects state
Date Tue, 04 Mar 2008 16:36:32 GMT
Hi Andrus,

AA> to find objects by FK you can match against a relationship target  
AA> object ObjectId:
AA> ExpressionFactory.matchExp("relationshipName", new  
AA> ObjectId("TargetEntity", "pk", 2);

Thanks, this is exactly what i need. However, it doesn't work on client (i mean manual checking
by match()).
The reason is in ASTEqual, where one object (o1) is Persistent, and the other one (o2) is
ObjectId. So straight checking currently implemented here (i mean o1.equals(o2)) isn't correct.
In my local Cayenne i just check for objects class (if it's Persistent then .getObjecId()
should be used). Maybe you more complicated fix must be done here. I can open bug issue if
you wish.

By the way, i assume you're from Belarus? So i can email you directly in Russian?)

View raw message