Hmm... since we were not aware of the original problem, I can't really
tell whether this works in 3.0.
Andrus
On Mar 25, 2008, at 4:34 AM, Malcolm Edgar wrote:
Hi All,
I have been upgrading an Cayenne 1.2 project to 3.0M3. I wanted to
know if some behaviour has changed.
I have had an issues RawSQL queries, where objects added have not been
evaluated by Velocity in the SQL template.
For example ${user.id} won't be evaluated to User.getId(). However
if I evaluate this in code, and then put ${userId} into the query a
parameter this works.
// Works
Map params = Collections.singletonMap("userId",
getUserDetails().getId());
NamedQuery query = new NamedQuery("ToDoSubmissionsForUser",
params);
// Does not work
Map params = Collections.singletonMap("user", getUserDetails());
NamedQuery query = new NamedQuery("ToDoSubmissionsForUser",
params);
regards Malcolm Edgar