when SA was first released, someone immediately suggested that the
identity map of Session be weak referencing, which appeared to be an
obvious improvement, so that you could load as many objects as you want
from the session and whatever you didnt use would just go away. but
now it appears that the more intuitive operation for a Session is that
things that get loaded into it, stay there, until you say otherwise.
If I got what yoy mean, I think I had suggested something like that
myself... but it was back in SA 0.1 days, when there was no explicit
Session.
But are you saying that doing sth like
a = MappedObject()
session.save(a)
del a
would prevent 'a' from being saved when flushing the session? In SA 0.3.1 it
seems to stay in it. Or it's just a matter of changed attributes, something
like
a = query.get_by(id=x)
a.attribute = 4
del a
?
In both cases, I think the strongly referenced behaviour is OK. If it's in a
session, I want an object to be tracked whatsoever, unless I explicitly
remove it.
--
Alan Franzoni [EMAIL PROTECTED]
-
Togli .xyz dalla mia email per contattarmi.
Remove .xyz from my address in order to contact me.
-
GPG Key Fingerprint (Key ID = FE068F3E):
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---