Hi, could someone advice me, please, how to split classes into
individual files?
I'm studying the documentation:
Creating Table, Class and Mapper All at Once Declaratively
http://www.sqlalchemy.org/docs/05/ormtutorial.html#creating-table-
class-and-mapper-all-at-once-declaratively.
If I keep all
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of camlost
Sent: 09 February 2009 09:18
To: sqlalchemy
Subject: [sqlalchemy] classes in separate files
Hi, could someone advice me, please, how to split classes into
individual
Yes, of course. This feature is provided by dbinit.py (mentioned at
the bottom of the orig. message).
c.
On 9 Ún, 10:42, King Simon-NFHD78 simon.k...@motorola.com wrote:
Are all your classes using the same declarative_base? I think this is
necessary so that the tables use the same metadata
Hi,
I would like to use an association object with two tables derived from
two declarative base classes.
What would be (if one may say) the right way to access (get and set)
the additional values in the association object?
When I set the 2 entities from the base classes and associate them I
get
Here is an example of how we are doing it.
http://dpaste.com/hold/118525
separate the big paste into files as indicated by the comments and you
should be able to run it.
One key is that you need to import the user class into the address.py
--
Mike
Thank you both for the answers.
Actually, I've just found a mistake in one of the files - there was a line:
Base = declarative_base()
:-/
It was left there from the previously all-in-one file version.
Best regards
c.
2009/2/9 MikeCo mconl...@gmail.com
Here is an example of how we are doing
I've traced it further, and it's an odd problem.
This syntax works fine:
memberProfile = self.session.query(MemberProfile).filter
(MemberProfile.memberID.in_(memberid)).order_by
(MemberProfile.memberID)
memberProfile = memberProfile.filter(MemberProfile.city ==
'Jamaica')
I've traced it further, and it's an odd problem.
This syntax works fine:
memberProfile = self.session.query(MemberProfile).filter
(MemberProfile.memberID.in_(memberid)).order_by
(MemberProfile.memberID)
memberProfile = memberProfile.filter(MemberProfile.city ==
'Jamaica')
this doesn't really say anything about the problem since neither of those
things changes anything about the objects. the issue is related to the
flush().
Gloria W wrote:
I've traced it further, and it's an odd problem.
This syntax works fine:
memberProfile =
Ahh, true. I switch the order of these operations, and always the
second one fails, no matter what. How should I debug this problem?
Thank you,
Gloria
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
Just a quick update: A forced flush between queries does no good.
Creating a new instance for each query seems to be the only immediate
cure.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
this has to do with the structure of your objects prior to the flush.
the answer lies in the objects being constructed and added, as well as any
connections created or broken between objects loaded into the current
session.
Gloria W wrote:
Just a quick update: A forced flush between
Understood. In my constructor, I was using a shared global
declarative_base, and a single session instance:
metdata = Base.metadata
engine = create_engine(config.db_conn)
engine.echo = False
Session = sessionmaker(bind=engine)
self.session = Session()
Only the self.session
I don't suppose a full example that reproduces the behavior by itself is
possible here ? if your program does not modify any data, then no
autoflush would occur.
Gloria W wrote:
Understood. In my constructor, I was using a shared global
declarative_base, and a single session instance:
I will put one together with a small database comprised of three
tables. Give me a couple of days, and I will have it to you.
Thank you,
Gloria
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To
When creating a Table object with the autoload parameter set to True,
DateTime fields in SQL Server 2000 apepar to cause fatal errors in
SQLAlchemy. In the reflecttable method in mssql.py, it pulls a
numericprec and numericscale value for the DateTime column. It then
stuffs these two values
On Feb 9, 2009, at 5:41 PM, Eric R. Palakovich Carr wrote:
Is this a real bug or am I doing something wrong?
there is ! you're reporting a bug against an 0.5 version prior to
the current 0.5 release (I know this since you're referencing a line
of code only present in prior versions of
On Mon, Feb 9, 2009 at 7:56 PM, Michael Bayer mike...@zzzcomputing.comwrote:
On Feb 9, 2009, at 5:41 PM, Eric R. Palakovich Carr wrote:
Is this a real bug or am I doing something wrong?
there is ! you're reporting a bug against an 0.5 version prior to
the current 0.5 release (I
18 matches
Mail list logo