Thanks for the the advice Domen, that seems to clear up many of my problems :-)
So right now I'm able to create a session, pull a few thousand records
and then close that session. Then those instances get displayed in
the gui and might get changed by some other threads, which will commit
them
Mike, thanks so much for responding.
--- On Sat, 3/28/09, Michael Bayer mike...@zzzcomputing.com wrote:
From: Michael Bayer mike...@zzzcomputing.com
Subject: [sqlalchemy] Re: Getting FlushError trying to merge related
objects
To: sqlalchemy@googlegroups.com
Date: Saturday, March 28,
--- On Mon, 3/30/09, Yassen Damyanov yassen_...@yahoo.com wrote:
It has also two
dirty CbPerson who's attributes correspond to those
already stored in the database. (I don't see the
CbRecord object amongst the dirty objects at that time.)
I am sorry, forgot to mention that these two ARE
İnstalled nose and tested: no error
It is OK now.
To make it easy for the developers not to care about the history tables and
versioning, is it possible not to define _history models manually and make
history_meta to generate them automatically?
Suha
On Fri, Mar 27, 2009 at 20:09, Michael Bayer
The problem is i defined the history class with the following way (examining
the test_versioning file):
--
Base = declarative_base(metaclass=VersionedMeta)
class User(Base):
__tablename__ = 'users'
id = sa.Column(sa.Integer, primary_key=True)
Hello everyone,
I switched from sqlite to postgres and the problem is that many tables
are not filled with data when my util adds them (while there was no such
problem with sqlite):
INFO:sqlalchemy.engine.base.Engine.0x...dbd4:INSERT INTO os_version (id,
OS_version) VALUES (%(id)
s,
Hello everyone,
Anybody?
I need to do smth like this in a mapper() call for table 'hosts':
'Earliest_reservation':relation(Reservation, order_by=Reservation.id,
backref='hosts'),
'Reservations':relation(Reservation,
secondary=reservation_hosts_assoc_table, backref='hosts')
That is, I need to
On Mar 30, 2009, at 4:14 AM, Marcin Krol wrote:
Hello everyone,
Anybody?
I need to do smth like this in a mapper() call for table 'hosts':
'Earliest_reservation':relation(Reservation, order_by=Reservation.id,
backref='hosts'),
'Reservations':relation(Reservation,
On Mar 30, 2009, at 4:32 AM, Suha Onay wrote:
İnstalled nose and tested: no error
It is OK now.
To make it easy for the developers not to care about the history
tables and versioning, is it possible not to define _history models
manually and make history_meta to generate them
On Mar 30, 2009, at 5:10 AM, Suha Onay wrote:
The problem is i defined the history class with the following way
(examining the test_versioning file):
--
Base = declarative_base(metaclass=VersionedMeta)
class User(Base):
__tablename__ =
On Mar 30, 2009, at 6:20 AM, Marcin Krol wrote:
Hello everyone,
I switched from sqlite to postgres and the problem is that many tables
are not filled with data when my util adds them (while there was no
such
problem with sqlite):
INFO:sqlalchemy.engine.base.Engine.0x...dbd4:INSERT
On Mar 29, 2009, at 11:00 PM, iain duncan wrote:
Hi Mike, I tried out the merging, but am hitting the snag that objects
referred to in relations are now going into the db twice. Ie
class MySeedData(SeedData):
van = Region(name=Vancouver)
event_1 = Event(name=Event 1, region=van)
is
On Mar 30, 2009, at 3:35 AM, Yassen Damyanov wrote:
The strange thing is (I'm checking this in the debugger) -- the
newRecord (which is CbRecord) looks perfect after creation -- all
five persons are attached to it via the 'persons' collection; all
'parent' attributes are properly
Michael Bayer wrote:
INFO:sqlalchemy.engine.base.Engine.0x...dbd4:{'OS_version': u'RHEL 5
64
ZSERIES', 'id': 8L}
INFO:sqlalchemy.engine.base.Engine.0x...dbd4:select
nextval('os_version_id_seq')
INFO:sqlalchemy.engine.base.Engine.0x...dbd4:None
there seems to be rows inserted there.
Michael Bayer wrote:
I need to do smth like this in a mapper() call for table 'hosts':
'Earliest_reservation':relation(Reservation, order_by=Reservation.id,
backref='hosts'),
'Reservations':relation(Reservation,
secondary=reservation_hosts_assoc_table, backref='hosts')
That is, I need to
On Mar 30, 2009, at 9:51 AM, Marcin Krol wrote:
Michael Bayer wrote:
INFO:sqlalchemy.engine.base.Engine.0x...dbd4:{'OS_version': u'RHEL 5
64
ZSERIES', 'id': 8L}
INFO:sqlalchemy.engine.base.Engine.0x...dbd4:select
nextval('os_version_id_seq')
On Mar 30, 2009, at 9:58 AM, Marcin Krol wrote:
Michael Bayer wrote:
I need to do smth like this in a mapper() call for table 'hosts':
'Earliest_reservation':relation(Reservation,
order_by=Reservation.id,
backref='hosts'),
'Reservations':relation(Reservation,
Michael Bayer wrote:
uh wait, how are you adding your objects to the Session ? are you
calling commit()? I notice there's no commit in the logs which is
likely the source of your issue.
I do call commit, it just turns out I missed an exception in the log
that took place before
On Mon, Mar 30, 2009 at 5:30 PM, Michael Bayer mike...@zzzcomputing.com wrote:
can you produce a small test case illustrating this ?
Sure, I'll do my best to produce one for you.
we have tests
exercising merge() in conjunction with delete-orphan cascade but
perhaps there is a bug here.
19 matches
Mail list logo