On 8/4/2010 10:03 PM, Mike Conley wrote:
On Wed, Aug 4, 2010 at 9:39 PM, Michael Hipp mich...@hipp.com
mailto:mich...@hipp.com wrote:
Can someone tell me why this code won't create any tables? The
tables are defined in another file that calls declarative_base().
I presume the
On Thu, Aug 5, 2010 at 6:29 AM, Michael Hipp mich...@hipp.com wrote:
On 8/4/2010 10:03 PM, Mike Conley wrote:
Thanks. But by the time I'm done there will be at least a dozen of those
otherfiles. Which one do I get Base from?
You can put the declaration of Base in a common file that is
On 8/5/2010 8:26 AM, Mike Conley wrote:
On Thu, Aug 5, 2010 at 6:29 AM, Michael Hipp mich...@hipp.com
mailto:mich...@hipp.com wrote:
On 8/4/2010 10:03 PM, Mike Conley wrote:
Thanks. But by the time I'm done there will be at least a dozen of
those otherfiles. Which one do I get
Can this be made to work?
session = Session()
rec = MyModel() # create a record
session.close()
# Sometime later
session = Session()
rec.name = Fred # modify the record
session.commit() # try to save modified record
session.close()
Does the session have to be global to this
On Aug 5, 2010, at 11:54 AM, Michael Hipp wrote:
Can this be made to work?
session = Session()
rec = MyModel() # create a record
session.close()
# Sometime later
session = Session()
rec.name = Fred # modify the record
session.commit() # try to save modified record
On 8/5/2010 11:03 AM, Michael Bayer wrote:
On Aug 5, 2010, at 11:54 AM, Michael Hipp wrote:
Can this be made to work?
session = Session()
rec = MyModel() # create a record
session.close()
# Sometime later
session = Session()
rec.name = Fred # modify the record
...and we're back to the same issue with another column_property: that
is,
How do you create column_properties with subqueries on child objects
where the subquery references another child object? This:
PC_avgdist_subq = select([func.avg(func.distance(PC.pt.RAW,
I have the following code:
from objects import *
class Device(Base):
__tablename__=testdev
devtype = Column(Unicode(20), primary_key = True)
__mapper_args__ = {'polymorphic_on': devtype}
mac = Column(Unicode(128), primary_key = True)
switch_mac = Column(Unicode(128), ForeignKey(mac))
switch =
Trying again without tab indents. Hopefully the formatting works this
time.
from objects import *
class Device(Base):
__tablename__=testdev
devtype = Column(Unicode(20), primary_key = True)
__mapper_args__ = {'polymorphic_on': devtype}
mac = Column(Unicode(128), primary_key =
On Aug 5, 2010, at 5:06 PM, Zippy P wrote:
I have the following code:
from objects import *
class Device(Base):
__tablename__=testdev
devtype = Column(Unicode(20), primary_key = True)
__mapper_args__ = {'polymorphic_on': devtype}
mac = Column(Unicode(128),
On Aug 5, 3:11 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Ultimately you're looking for a self-referential correlation here. In SQL,
that always implies using aliases. Your column_property needs to be against
aliased(PC) and not PC itself.
Thanks - that did the trick. I
Hi,
First message here in the sqlalchemy mailing list. I was working with
a previous version of sqlalchemy (0.6beta1) and while updating
sqlalchemy, ran into a problem with polymorphic classes. Basically
we're using a single table inheritance scheme and we want the value
column to have different
12 matches
Mail list logo