Thanks!
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Sunday, April 07, 2013 5:46 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Self-referencing augmented class
On Apr 7, 2013, at 8:27 AM, Alexey Vihorev wrote:
I'm using SQLAlchemy on an existing database, with some one->many with the
many row connecting to a many-many department/status system. The main
fields are something like this:
Parent.id
Parent.mainStatus
Child.id
Child.parent_link
Child.department_id
Child.status_id
Department.id
DepartmentAs
Thanks for the reply Michael. I had already done some experimentation with
the 'Session.after_begin' event, so I think I'll revisit that for now, but
#2685 looks like a very elegant solution, looking forward to that.
--Pedro.
On Sunday, 7 April 2013 15:44:55 UTC+1, Michael Bayer wrote:
>
> we w
On Apr 7, 2013, at 8:27 AM, Alexey Vihorev wrote:
> Hi!
>
> I’ve got this setup:
>
> cs = "sqlite:///:memory:"
> sa_engine = create_engine(cs)
>
> Base = declarative_base()
>
> class Person(Base):
>
> __abstract__ = True
>
> id = Column(Integer, primary_key=True)
> name =
Thank you very much for your effort in putting together a complete and
working example.
Much appreciated,
Thijs
On Sat, Apr 6, 2013, at 18:10, Audrius Kažukauskas wrote:
> Hi, Thijs,
>
> On Thu, 2013-04-04 at 21:36:56 +0200, Thijs Engels wrote:
> > Assume a database with two tables; sessions an
we will be supporting this as a connection execution option in
http://www.sqlalchemy.org/trac/ticket/2685, so the usage will be like:
conn = connection.execution_options(default_schema=someschema)
s = Session(bind=conn)
< work with Session or Connection >
for now the easiest approach is to set
Hi!
I've got this setup:
cs = "sqlite:///:memory:"
sa_engine = create_engine(cs)
Base = declarative_base()
class Person(Base):
__abstract__ = True
id = Column(Integer, primary_key=True)
name = Column(String(30))
class Employee(Person):
__tablename__ = 'employee
Having to support different PostgreSQL schemas per web request and finding
my current approach of setting the PostgreSQL schema search path a bit
convoluted, when I try to use longer lived sessions in unit tests
for convenience, because the session starts using a new database connection
after a