Re: [Modeling-users] Couple of questions...
Status: Abandoned
Brought to you by:
sbigaret
From: Mario R. <ma...@ru...> - 2004-04-21 08:20:43
|
Hello! I had come across these kind of limitations a few months ago... not developing at the moment, but I find the issue interesting... so, just my 2 centimes ;) > This makes me think that it could be nice to have something like > >>>> ec.fetch('Writer', 'NOT EXISTS(books.publisher.bizName!="P1")' I would say yes this would be very nice to have... and this almost seems to me a consistent and natural extension of what is supported already, i.e. 'AND', 'OR', 'NOT', 'IN', 'NOT IN', 'like', ilike', ... anything else? Almost... because EXISTS applies to a independent subquery, while the other keywords are constraints on the current query. Would this be a possible source of confusion? What happens if we intermix these keywords, e.g. ec.fetch('Writer', 'books.publisher.numPages>50 AND (books.publisher.bizName IN ["P1","P2"]) AND NOT EXISTS(books.publisher.bizName NOT IN ["P1","p2"] ) ' to get the authors that have books with at least 51 pages as well as having published with both of P1 and P2 but with no one else. Would this work? There would be a simpler way to do this? mario |