[Lift] Re: find, set and save

2009-07-29 Thread Hannes
Hi Dave, Thanks for your answer and sorry for the late reply. In the first filter line... do you just want to filter out the LimitOrders that do not have the same tradeType foreign key reference as the FK of the parameter that you pass in? Yes, that's part of the filtering, but I need to do

[Lift] Re: find, set and save

2009-07-29 Thread David Pollak
On Wed, Jul 29, 2009 at 1:09 PM, Hannes hannes.flo...@gmx.li wrote: Hi Dave, Thanks for your answer and sorry for the late reply. In the first filter line... do you just want to filter out the LimitOrders that do not have the same tradeType foreign key reference as the FK of the

[Lift] Re: find, set and save

2009-07-22 Thread David Pollak
Howdy, You can save some memory by using findMap: def joinOrders(o1: LimitOrder): Unit = { /* select all orders where status=NEW and where that.tradeType != order1.tradeType */ val newOrders = LimitOrderMetaObj.findMap(By(LimitOrderMetaObj.status, NEW)){o2 =

[Lift] Re: find, set and save

2009-07-22 Thread Hannes
Hi David, Thanks for that trick! But until there I had no problems.is code ok, that modifies and saves the model? Cause it feels like the changes are not saved. thanks Tobias Howdy, You can save some memory by using findMap: def joinOrders(o1: LimitOrder): Unit = { /* select all

[Lift] Re: find, set and save

2009-07-22 Thread Hannes
I got a compiler error when I tried to compile: val newOrders = LimitOrderMetaObj.findMap(By(LimitOrderMetaObj.status, NEW)){o2 = Full(o2).filter(o2.tradeType.name != o1.tradeType.name)} - error: type mismatch; found : Boolean required:

[Lift] Re: find, set and save

2009-07-22 Thread Hannes
I kind of found the problem. So far, it has nothing to do with save or anything like that. The problem is that this line: val newOrders = LimitOrderMetaObj.findAll(By(LimitOrderMetaObj.status, NEW)).toList.filter(o2 = o2.tradeType.name != o1.tradeType.name) does not compare the name of the

[Lift] Re: find, set and save

2009-07-22 Thread David Pollak
In the first filter line... do you just want to filter out the LimitOrders that do not have the same tradeType foreign key reference as the FK of the parameter that you pass in? Can you post the model opens (the LimitOrder and the other stuff) as well as the logic? For example,