[sqlalchemy] Re: multiple foreign references to the same table

2008-09-27 Thread Michael Bayer
On Sep 26, 2008, at 9:02 PM, adolfo wrote: Hello, and sorry if this issue is already covered. I have a table which makes foreign references to other table, and I need to make a filter against that table multiple times. so I have: q1=session.query(Fuente).outerjoin(Fuente.PPersona,

[sqlalchemy] multiple foreign references to the same table

2008-09-27 Thread adolfo
Hello, and sorry if this issue is already covered. I have a table which makes foreign references to other table, and I need to make a filter against that table multiple times. so I have: q1=session.query(Fuente).outerjoin(Fuente.PPersona, aliased=True).outerjoin(Fuente.PPersona_como_fuente,

[sqlalchemy] Problem with query and lazyload

2008-09-27 Thread Mike Bernson
I have a problem with row coming back form mapped class that has relations. The session is created with: self.session = Session(bind=self._engine, autoflush=False, _enable_transaction_accounting=False, autocommit=True, weak_identity_map=True) The problem occurs with

[sqlalchemy] Re: reflection unavailable for mysql temporary tables?

2008-09-27 Thread jason kirtland
Andy Davidoff wrote: Reflection of temporary tables under MySQL works around revision 4000 and probably as recently as May but doesn't seem to work under revision 5000 or later; I get a NoSuchTableError. Is this change intentional? If the only change I make to my code is to create and

[sqlalchemy] Custom type definition and can't adapt 'INSERT INTO.... error

2008-09-27 Thread Sean Davis
I have been playing with new types using sqlalchemy and have an error I do not understand. Table schema and type definition are here: - def generate_uuid(): return uuid.uuid1() class GUID(sa.types.TypeEngine): def __init__(self): pass

[sqlalchemy] Re: Custom type definition and can't adapt 'INSERT INTO.... error

2008-09-27 Thread Michael Bayer
On Sep 27, 2008, at 3:12 PM, Sean Davis wrote: I have been playing with new types using sqlalchemy and have an error I do not understand. Table schema and type definition are here: - def generate_uuid(): return uuid.uuid1() class

[sqlalchemy] Re: Problem with query and lazyload

2008-09-27 Thread Michael Bayer
Attached is a script that attempts to imitate as close as I can tell to what you are asking (and the end result is correct). Modify it to illustrate your exact issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] A Table that recursively backref's itself

2008-09-27 Thread dasacc22
Hi, I was trying to do something like this class Folder(Base): __tablename__ = 'folder' id = Column(Integer, primary_key=True) name = Column(String) folder_id = Column(Integer, ForeignKey('folder.id')) #folder = relation(Folder, backref=backref('folder', order_by=id))

[sqlalchemy] Re: reflection unavailable for mysql temporary tables?

2008-09-27 Thread Andy Davidoff
Perfect, thank you! On Sep 27, 2:28 pm, jason kirtland [EMAIL PROTECTED] wrote: Andy Davidoff wrote: Reflection of temporary tables under MySQL works around revision 4000 and probably as recently as May but doesn't seem to work under revision 5000 or later; I get a NoSuchTableError.  Is

[sqlalchemy] Re: Problem with query and lazyload

2008-09-27 Thread Mike Bernson
I am working on recreating the problem. It is not quite as simple as I thought. I have both mapper extension, and event listener going. Also there is a backref between the parent and child. It may take a while but I am working on creating a standalone program that creates the problem. Michael

[sqlalchemy] Re: Custom type definition and can't adapt 'INSERT INTO.... error

2008-09-27 Thread Sean Davis
On Sep 27, 5:16 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Sep 27, 2008, at 3:12 PM, Sean Davis wrote: I have been playing with new types using sqlalchemy and have an error I do not understand.  Table schema and type definition are here: -

[sqlalchemy] Re: multiple foreign references to the same table

2008-09-27 Thread adolfo
That was of great help. Thanks a lot!! Adolfo On Sep 27, 9:04 am, Michael Bayer [EMAIL PROTECTED] wrote: On Sep 26, 2008, at 9:02 PM, adolfo wrote: Hello, and sorry if this issue is already covered. I have a table which makes foreign references to other table, and I   need to make a