Re: Using alembic in a plugin pattern

2014-05-11 Thread Michael Bayer
On May 11, 2014, at 9:03 AM, Steeve C steevechaill...@gmail.com wrote: hi, I'm looking for writing plugins (stevedore) for my application, all plugins are new python modules and can create some entry|columns|table in the application database, I want to manage migration by plugins|modules

[sqlalchemy] Emptying relationship records trigger update

2014-05-11 Thread Alexander Luksidadi
Im just trying to empties a one to many records by doing this: load.commodities = [] then what happens next is: IntegrityError: (IntegrityError) null value in column load_id violates not-null constraint DETAIL: Failing row contains (35d39bd9-ca61-43ef-a5c5-7590c82aca1d, 2014-05-11

Re: [sqlalchemy] selects, mappers and foreign keys

2014-05-11 Thread Richard Gerd Kuesters
thanks Mike! the problem is that the other side is also a selectable, so: foo = relationship(Remote, primaryjoin=myselect.c.foo == myotherselect.c.bar) myselect.c.foo *is* a foreign key to some table primary key that is the value of myotherselect.c.bar, but i can't figure out why or how

Re: [sqlalchemy] Relationship setup

2014-05-11 Thread Michael Bayer
On May 11, 2014, at 12:27 AM, Joseph Casale jcas...@gmail.com wrote: What I wanted to know was if it was possible to construct either a table definition for TableB so that someone could simply pass in actual values of table_a.name to meta columns in table_b. For example if #3 above is

Re: [sqlalchemy] Emptying relationship records trigger update

2014-05-11 Thread Michael Bayer
On May 11, 2014, at 3:05 AM, Alexander Luksidadi alexander.luksid...@gmail.com wrote: Im just trying to empties a one to many records by doing this: load.commodities = [] then what happens next is: IntegrityError: (IntegrityError) null value in column load_id violates not-null

Re: [sqlalchemy] selects, mappers and foreign keys

2014-05-11 Thread Michael Bayer
On May 11, 2014, at 10:38 AM, Richard Gerd Kuesters rich...@humantech.com.br wrote: thanks Mike! the problem is that the other side is also a selectable, so: foo = relationship(Remote, primaryjoin=myselect.c.foo == myotherselect.c.bar) so again, i can see this might have issues,

[sqlalchemy] Re: Emptying relationship records trigger update

2014-05-11 Thread Alexander Luksidadi
Thank you Michael. you are definitely the best and most responsive author out there! On Sunday, May 11, 2014 3:05:32 AM UTC-4, Alexander Luksidadi wrote: Im just trying to empties a one to many records by doing this: load.commodities = [] then what happens next is: IntegrityError:

Re: [sqlalchemy] Relationship setup

2014-05-11 Thread Joseph Casale
Hey Michael, I really appreciate all that, it was extremely informative. For the academic sake I have this extrapolated to include all the actual intermediate tables that TableB would include. For the academic sake, without the mixin and proxy, given a traditional approach where TableA is

Re: [sqlalchemy] selects, mappers and foreign keys

2014-05-11 Thread Richard Gerd Kuesters
thanks Mike, that worked fine. my code, though, didn't went further (i'll have to debug a little bit more) :) best regards, richard. Em 2014-05-11 14:43, Michael Bayer escreveu: On May 11, 2014, at 10:38 AM, Richard Gerd Kuesters rich...@humantech.com.br wrote: thanks Mike!

Re: [sqlalchemy] Relationship setup

2014-05-11 Thread Michael Bayer
On May 11, 2014, at 4:28 PM, Joseph Casale jcas...@gmail.com wrote: Hey Michael, I really appreciate all that, it was extremely informative. For the academic sake I have this extrapolated to include all the actual intermediate tables that TableB would include. For the academic sake,