Re: Best way to turn a DataRow into an Object instance in ROP client?

2009-06-05 Thread Andrus Adamchik
I have a DataRow in an ROP client. Is there a way to turn it into an object registered to a CayenneContext without doing another read to the database? You can using DataObjectUtils. But this will incur a trip to the server. Whether the server will query the DB or not depends on whether the

Inverting an expression

2009-06-05 Thread Øyvind Harboe
I've got an expression that returns all "incidents" that matches the area of responsibility for a "user". Is there a way to programatically invert such an expression to return all "user" who are responsible for an "incident"? The problem with a manual conversion is that it introduces the changes

Problems with Expression.match()

2009-06-05 Thread Øyvind Harboe
I'm trying to figure out if a CayenneDataObject matches an expression and I run into various and sundry problems. This is the final solution I ended up with, but it's pretty ugly. List l=getDataContext().performQuery(new SelectQuery(Treatment.class,