filtering in where loops does not work properly when based on variable set on runtim
this is minimal testcase that I could find:
entity A {
name2 :: Int
}init { for ( count : Int from 0 to 10 ){ var x := A { name2 := count}; x.save(); } } define page root(){ var timestamp : Long init{ var json := JSONObject(); json.put("lastSynced",0); var timestamp := json.getLong("lastSynced") ; } for (ent : A in A.all() where timestamp == 0){ par{output(ent.name2)} } }
this should display 0 to 9 however displays nothing
if you replace the init with
var timestamp := 0
it will work as it should
Submitted by chris melman on 12 October 2012 at 15:04
Issue Log
On 12 October 2012 at 15:05 chris melman tagged @chrisgersen
On 12 October 2012 at 15:49 chris melman removed tag @chrisgersen
On 12 October 2012 at 15:49 chris melman commented:
it seems that the cause is something else
On 12 October 2012 at 15:50 chris melman closed this issue.
Log in to post comments