Re: [sqlalchemy] restrict child count?

2015-05-19 Thread Mike Bayer
On 5/19/15 8:57 AM, Richard Gerd Kuesters wrote: hi! this may be a weird question, but is there a way i can restrict the number of children in a relationship? not by limit ... how is that different? Anytime in SQL you want to get only the first N of M, LIMIT or its equivalents must be

Re: [sqlalchemy] restrict child count?

2015-05-19 Thread Richard Gerd Kuesters
thanks Mike! when i stated about the limit, it was because it must not be taken as a parameter for any query, which select * from blah and select * from bla limit N should be return the same exactly number of rows, including where filters and so on. it is something like a physical rule, where

Re: [sqlalchemy] restrict child count?

2015-05-19 Thread Mike Bayer
On 5/19/15 10:54 AM, Richard Gerd Kuesters wrote: thanks Mike! when i stated about the limit, it was because it must not be taken as a parameter for any query, which select * from blah and select * from bla limit N should be return the same exactly number of rows, including where filters

Re: [sqlalchemy] restrict child count?

2015-05-19 Thread Richard Gerd Kuesters
bingo! thanks Simon. that's exactly the question :) well, the checks on the cube are already there (they must have a value higher then 0 to have a volume), but i must not increment the cube children more then it's maximum capacity. i'm considering an event listener as well, but i'm wondering

Re: [sqlalchemy] restrict child count?

2015-05-19 Thread Simon King
On Tue, May 19, 2015 at 4:06 PM, Mike Bayer mike...@zzzcomputing.com wrote: On 5/19/15 10:54 AM, Richard Gerd Kuesters wrote: thanks Mike! when i stated about the limit, it was because it must not be taken as a parameter for any query, which select * from blah and select * from bla limit