Re: [sqlalchemy] Non negative integer column

2013-06-11 Thread Avishay Balderman
I prefer to have a server side solution... but cant find a generic one. On Monday, June 10, 2013 4:46:54 PM UTC+3, Michael Bayer wrote: Oh. Well a python side rule is very different from a server side rule, but if app side is all you need then sure you have a lot of options there. Use a

Re: [sqlalchemy] [Q][0.7.9] All scoped sessions use ONE DB connection

2013-06-11 Thread Ladislav Lenart
Hello. On 10.6.2013 18:41, Michael Bayer wrote: On Jun 10, 2013, at 11:46 AM, Ladislav Lenart lenart...@volny.cz wrote: I have no idea what is wrong. Please help me diagnose this! Note that OS monitor shows several cherrypy threads, each gets its share, so the cherrypy setup seems

Re: [sqlalchemy] [Q][0.7.9] All scoped sessions use ONE DB connection

2013-06-11 Thread Ladislav Lenart
Hello. Problem solved! It was a false alarm. My Firefox simply serializes all requests to one domain. (BTW Chrome does that too.) This is strange however, because I have more connections enabled in Firefox about:config (network.http.* and friends). Have anyone of you solved this? Thank you and

[sqlalchemy] self-referential one to many relationship with a kind of composite foreign key

2013-06-11 Thread Greg Yang
Consider these 2 mapped classes from sqlalchemy.engine import create_engine from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.declarative.api import declarative_base from sqlalchemy.orm import relationship from sqlalchemy.orm.session import sessionmaker from

Re: [sqlalchemy] self-referential one to many relationship with a kind of composite foreign key

2013-06-11 Thread Michael Bayer
getting it to work with secondary or only primaryjoin as it sometimes works out is fairly complex and might not be possible. If secondary, you might need to make secondary an aliased SELECT statement, or in 0.9 maybe it can be a a JOIN, that represents all the intermediary rows. Might work,

Re: [sqlalchemy] Feature suggestion: fake ForeignKeyConstraints to simplify joins

2013-06-11 Thread Andy
On Friday, June 7, 2013 12:49:46 PM UTC-7, Charlie Clark wrote: Am 07.06.2013, 01:13 Uhr, schrieb Andy aml...@gmail.com javascript:: I may be misunderstanding the question, but the reason that having a favorite is optional is because I'm using mysql and mysql doesn't supported

Re: [sqlalchemy] self-referential one to many relationship with a kind of composite foreign key

2013-06-11 Thread Greg Yang
How would you use proxies? I can get B.a_re.children.b_re, but this includes all Bs that have different B.id than I want along with the ones I do want. I could just use a @property that issues SQL on every call, but I'm trying to see if there are more efficient ways of doing this. On Tuesday,