Michael Bayer wrote:
The recursion overflow is fixed and make_transient now removes expiration
flags. In the latest tip you can now say:
session.expire(object, ['id'])
make_transient(object)
or alternatively:
make_transient(object)
object.id = None
and the
On Jul 7, 2010, at 5:40 AM, Chris Withers wrote:
Michael Bayer wrote:
The recursion overflow is fixed and make_transient now removes expiration
flags. In the latest tip you can now say:
session.expire(object, ['id'])
make_transient(object)
or alternatively:
Michael Bayer wrote:
Did this make it into 0.6.2?
If so, I'll update the recipe...
yeah and the recipe should be up to date.
Cool :-)
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
--
You received this message
Michael Bayer wrote:
The recursion overflow is fixed and make_transient now removes expiration
flags. In the latest tip you can now say:
session.expire(object, ['id'])
make_transient(object)
or alternatively:
make_transient(object)
object.id = None
and the
On Jun 29, 2010, at 6:57 PM, Michael Bayer wrote:
On Jun 29, 2010, at 6:27 PM, Chris Withers wrote:
Michael Bayer wrote:
for thing in session.query(MyThing).all():
... print x.id, x.name, x.value, x.valid_from, x.valid_to
1, 'foo', 100, 2010-06-29 09:00, 2010-06-29 09:05
2, 'foo',
Hi All,
Is it legit/okay/bad to do things in a MapperExtension's before_insert
and/or before_update methods?
Specifically, the following:
- change the primary key of the instance by deleting it so that the
dataabse assigns a new primary key?
- do a query to update an existing row? (where
On Jun 29, 2010, at 7:46 AM, Chris Withers wrote:
Hi All,
Is it legit/okay/bad to do things in a MapperExtension's before_insert and/or
before_update methods?
Specifically, the following:
- change the primary key of the instance by deleting it so that the dataabse
assigns a new
Michael Bayer wrote:
Specifically, the following:
- change the primary key of the instance by deleting it so that the dataabse
assigns a new primary key?
that wont work. you need to take the object and call make_transient() on it, re-add it to the session.
Where is make_transient
On Jun 29, 2010, at 11:07 AM, Chris Withers wrote:
Michael Bayer wrote:
Specifically, the following:
- change the primary key of the instance by deleting it so that the
dataabse assigns a new primary key?
that wont work. you need to take the object and call make_transient() on
it,
Michael Bayer wrote:
for thing in session.query(MyThing).all():
... print x.id, x.name, x.value, x.valid_from, x.valid_to
1, 'foo', 100, 2010-06-29 09:00, 2010-06-29 09:05
2, 'foo', 200, 2010-06-29 09:05, None
`x` used to correspond to the row with id of 1, but now corresponds to the row
On Jun 29, 2010, at 6:27 PM, Chris Withers wrote:
Michael Bayer wrote:
for thing in session.query(MyThing).all():
... print x.id, x.name, x.value, x.valid_from, x.valid_to
1, 'foo', 100, 2010-06-29 09:00, 2010-06-29 09:05
2, 'foo', 200, 2010-06-29 09:05, None
`x` used to correspond to
Michael Bayer wrote:
- I take it there are no problems with specifying multiple extensions to
sessionmaker? (we need zope.sqlalchemy's extension too) What effect does order
of extensions have?
calls them in order
heh, so what order to put 'em in? I'm guessing zope.sqlalchemy's one
should
12 matches
Mail list logo