Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-07-01 Thread Ken Lareau
**SIGH** Please ignore last message... I had forgotten to actually update the database schema itself. :( Pardon me while I go shoot myself... - Ken On Tue, Jul 1, 2014 at 4:19 PM, Ken Lareau wrote: > On Thu, Jun 26, 2014 at 7:47 PM, Ken Lareau wrote: > >> On Jun 26, 2014 7:40 PM, "Mike Bayer

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-07-01 Thread Ken Lareau
On Thu, Jun 26, 2014 at 7:47 PM, Ken Lareau wrote: > On Jun 26, 2014 7:40 PM, "Mike Bayer" wrote: > > > > right, so a few emails ago I said: > > > > > you need to put .label('environment') on that column before it finds > its way into subq. I dont have the mappings here to review. > > > > here

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
On Jun 26, 2014 7:40 PM, "Mike Bayer" wrote: > > right, so a few emails ago I said: > > > you need to put .label('environment') on that column before it finds its way into subq. I dont have the mappings here to review. > > here's that: > > > @environment.expression > def environment(cls)

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Mike Bayer
right, so a few emails ago I said: > you need to put .label('environment') on that column before it finds its way into subq. I dont have the mappings here to review. here's that: @environment.expression def environment(cls): return select( [Environment.enviro

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
Done, new file attached (this gives the same error message as the one I showed initially, at least on my system). - Ken -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Mike Bayer
a self contained version of "before" is attached, seems to work as is (works in 0.8 too). Modify it to show me it not working. output: SELECT t_ordered.pkg_name AS t_ordered_pkg_name, t_ordered.version AS t_ordered_version, t_ordered.revision AS t_ordered_revision, t_ordered."appType" AS "t_orde

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
On Thu, Jun 26, 2014 at 1:45 PM, Mike Bayer wrote: > minimal mapping + the query against that mapping. > > Okay, for the other method I needed to change, I think I've put together complete enough examples and have attached the files. The 'before' file is what we have currently (and doesn't quit

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Mike Bayer
minimal mapping + the query against that mapping. On 6/26/14, 4:11 PM, Ken Lareau wrote: > On Thu, Jun 26, 2014 at 5:57 AM, Mike Bayer > wrote: > > > On 6/25/14, 8:06 PM, Ken Lareau wrote: >> On Wed, Jun 25, 2014 at 6:28 AM, Mike Bayer >> mailto:mike.

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
On Thu, Jun 26, 2014 at 5:57 AM, Mike Bayer wrote: > > On 6/25/14, 8:06 PM, Ken Lareau wrote: > > On Wed, Jun 25, 2014 at 6:28 AM, Mike Bayer > wrote: > >> >> On 6/25/14, 2:26 AM, Ken Lareau wrote: >> >> On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer >> wrote: >> >>> >>> On 6/23/14, 8:09 PM, Ken L

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Mike Bayer
On 6/25/14, 8:06 PM, Ken Lareau wrote: > On Wed, Jun 25, 2014 at 6:28 AM, Mike Bayer > wrote: > > > On 6/25/14, 2:26 AM, Ken Lareau wrote: >> On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer >> mailto:mike...@zzzcomputing.com>> wrote: >> >> >> On 6/

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-25 Thread Ken Lareau
On Wed, Jun 25, 2014 at 6:28 AM, Mike Bayer wrote: > > On 6/25/14, 2:26 AM, Ken Lareau wrote: > > On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer > wrote: > >> >> On 6/23/14, 8:09 PM, Ken Lareau wrote: >> > >> > if apptier: >> > subq = ( >> > Session.query( >> >

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-25 Thread Mike Bayer
On 6/25/14, 2:26 AM, Ken Lareau wrote: > On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer > wrote: > > > On 6/23/14, 8:09 PM, Ken Lareau wrote: > > > > if apptier: > > subq = ( > > Session.query( > > Packa

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-24 Thread Ken Lareau
On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer wrote: > > On 6/23/14, 8:09 PM, Ken Lareau wrote: > > > > if apptier: > > subq = ( > > Session.query( > > Package.pkg_name, > > Package.version, > > Package.revision, > >

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-24 Thread Mike Bayer
On 6/23/14, 8:09 PM, Ken Lareau wrote: > > if apptier: > subq = ( > Session.query( > Package.pkg_name, > Package.version, > Package.revision, > AppDefinition.app_type, > AppDeployment.environmen

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-24 Thread Ken Lareau
Anyone? This has me dead in the water and nothing in the documentation has been helping. - Ken On Mon, Jun 23, 2014 at 5:09 PM, Ken Lareau wrote: > On Fri, Jun 20, 2014 at 3:46 PM, Ken Lareau wrote: > >> On Fri, Jun 20, 2014 at 1:23 PM, Mike Bayer >> wrote: >> >>> >>> On 6/20/14, 3:38 PM, K

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-23 Thread Ken Lareau
On Fri, Jun 20, 2014 at 3:46 PM, Ken Lareau wrote: > On Fri, Jun 20, 2014 at 1:23 PM, Mike Bayer > wrote: > >> >> On 6/20/14, 3:38 PM, Ken Lareau wrote: >> >> So in the ongoing improvement of one of our internal databases, we >> created >> a new table named 'environments' whose SQLA code looks

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-20 Thread Ken Lareau
On Fri, Jun 20, 2014 at 1:23 PM, Mike Bayer wrote: > > On 6/20/14, 3:38 PM, Ken Lareau wrote: > > So in the ongoing improvement of one of our internal databases, we > created > a new table named 'environments' whose SQLA code looks something like > this: > > class Environment(Base): > __ta

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-20 Thread Mike Bayer
On 6/20/14, 3:38 PM, Ken Lareau wrote: > So in the ongoing improvement of one of our internal databases, we created > a new table named 'environments' whose SQLA code looks something like > this: > > class Environment(Base): > __tablename__ = 'environments' > > id = Column(u'environmentID'

[sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-20 Thread Ken Lareau
So in the ongoing improvement of one of our internal databases, we created a new table named 'environments' whose SQLA code looks something like this: class Environment(Base): __tablename__ = 'environments' id = Column(u'environmentID', INTEGER(), primary_key=True) environment = Colum