Thread: [Sqlalchemy-tickets] [sqlalchemy] #1315: Without autoflush child object added to unitialized parent
Brought to you by:
zzzeek
From: sqlalchemy <mi...@zz...> - 2009-02-11 19:29:06
|
#1315: Without autoflush child object added to unitialized parent's collection property twice --------------------+------------------------------------------------------- Reporter: guest | Owner: zzzeek Type: defect | Status: new Priority: medium | Milestone: Component: orm | Severity: no triage selected yet Keywords: | Status_field: awaiting triage --------------------+------------------------------------------------------- Testcase is in the attachment. I'll be glad to help if you point me. ---- Angri -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1315> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
From: sqlalchemy <mi...@zz...> - 2009-02-11 19:41:46
|
#1315: Without autoflush child object added to unitialized parent's collection property twice --------------------------------+------------------------------------------- Reporter: guest | Owner: zzzeek Type: defect | Status: new Priority: medium | Milestone: Component: orm | Severity: no triage selected yet Resolution: | Keywords: Status_field: awaiting triage | --------------------------------+------------------------------------------- Comment (by zzzeek): I'm considering as a solution here to remove the `flush([objects])` feature in 0.6. There should be no use case for it. -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1315#comment:1> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
From: sqlalchemy <mi...@zz...> - 2009-02-11 20:40:36
|
#1315: more relation/collection state confusion when using session.flush([only_one_of_the_objects]). time to deprecate ? ---------------------------------+------------------------------------------ Reporter: guest | Owner: zzzeek Type: defect | Status: new Priority: medium | Milestone: 0.6.0 Component: orm | Severity: minor - half an hour Resolution: | Keywords: Status_field: not decided upon | ---------------------------------+------------------------------------------ Changes (by zzzeek): * status_field: awaiting triage => not decided upon * summary: Without autoflush child object added to unitialized parent's collection property twice => more relation/collection state confusion when using session.flush([only_one_of_the_objects]). time to deprecate ? * severity: no triage selected yet => minor - half an hour * milestone: => 0.6.0 Comment: r5789 allows you to properly reset the state of `parent.children`: {{{ session.flush([child]) session.expire(parent, ['children']) assert parent.children == [child], "%r != %r" % (parent.children, [child]) }}} but seriously, try to not use `flush([obj])`. it makes no sense to use it on a single object in the midst of an interconnected graph of dependencies. -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1315#comment:2> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |
From: sqlalchemy <mi...@zz...> - 2009-03-01 23:54:35
|
#1315: more relation/collection state confusion when using session.flush([only_one_of_the_objects]). time to deprecate ? ---------------------------------+------------------------------------------ Reporter: guest | Owner: zzzeek Type: defect | Status: closed Priority: medium | Milestone: 0.5.xx Component: orm | Severity: minor - half an hour Resolution: wontfix | Keywords: Status_field: completed/closed | ---------------------------------+------------------------------------------ Changes (by zzzeek): * status: new => closed * status_field: not decided upon => completed/closed * resolution: => wontfix * milestone: 0.6.0 => 0.5.xx Comment: we've agreed on the deprecation, that's in r5822. -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1315#comment:3> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |