Hi!
Maybe it's a simple question, but I'm stuck on it.
Given a table with primary autoinc key on "id" field, and a Read data function set up with primary model on this table. I want this function to retrieve a) all records when {data:id} is not defined; b) one record when {data:id} is defined; c) empty set when {data:id} is defined and equals 0.
Tried "where conditions" id:{data:id}, id:{data:id}/-, id:{data:id/0} and so on. Also tried id:{var:id} combinations, giving {fn:read1$id=(data:id)}. Some fail to get all records, some fail to get an empty set. Am I missing a simple way to get wanted behavior?
Thanks!
Maybe it's a simple question, but I'm stuck on it.
Given a table with primary autoinc key on "id" field, and a Read data function set up with primary model on this table. I want this function to retrieve a) all records when {data:id} is not defined; b) one record when {data:id} is defined; c) empty set when {data:id} is defined and equals 0.
Tried "where conditions" id:{data:id}, id:{data:id}/-, id:{data:id/0} and so on. Also tried id:{var:id} combinations, giving {fn:read1$id=(data:id)}. Some fail to get all records, some fail to get an empty set. Am I missing a simple way to get wanted behavior?
Thanks!