I am trying to run this query:
query PapersFromAPoll
{
description: "retrieve all the papers from a poll"
statement:
SELECT org.acme.democracity.Paper
WHERE(poll.pollId == _$id)
}
When I execute this query, i dont get any rows, here is the fragment where I make this query:
return query('PapersFromAPoll',{id : count.poll.pollId})
Paper and Poll in model.cto file:
asset Paper identified by paperId {
o String paperId
o String[] fields
--> Poll poll //Paper related with a poll
}
asset Poll identified by pollId {
o String pollId
o Ask[] asks
}