Re: Internal row comparison in ExpressionFactory

2009-03-26 Thread John Armstrong
I couldn't quite get the EJBQL syntax right so I ended up using fromString Expression qual = Expression.fromString("code like $license and claimedunits < totalunits"); java.util.Map params = new java.util.HashMap(); params.put("license", licenseCode.

Serialization and de-serialization or ROP objects

2009-03-26 Thread Zissis Trabaris
The question at hand is: Given an ROP client object retrieved from the database, can I serialize it to disk, later on, de-serialize it to memory, register it to a context and use it as if it came from the database? Some caveats of course... Assume the database did not change since the serialization

Re: Internal row comparison in ExpressionFactory

2009-03-26 Thread Andrey Razumovsky
Hi John, You should try EJBQL: select t0 from License t0 where t0.claimedunits < t0.totalunits AND http://cayenne.apache.org/doc/ejbqlquery.html 2009/3/26 John Armstrong > Hi, I need to do a selection on a table partially based on comparing > two elements > of that table. Basically a 'tot

Internal row comparison in ExpressionFactory

2009-03-26 Thread John Armstrong
Hi, I need to do a selection on a table partially based on comparing two elements of that table. Basically a 'total' and a 'current' where total is a changing value and needs to be compared to current to see if the row is valid. Its a floating license system for an app I am building. This obviousl