Store.get() on invalidated objects should retrieve all fields rather than just checking the object is alive
Bug #697513 reported by
James Henstridge
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
Medium
|
James Henstridge |
Bug Description
If we have an invalidated Python object for a given row in a table, Store.get() will return that object after calling Store._
If we are going to suffer a database round trip anyway it would seem sensible to fill out the entire object in this case, since it is likely that the caller will want to use the object it has just requested.
Related branches
lp:~jamesh/storm/bug-697513
- Jamu Kakar (community): Approve
- Gustavo Niemeyer: Approve
- Diff: 0 lines
Changed in storm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Attached is a test program. In the first transaction, retrieving the object and accessing an attribute results in one query:
SELECT foo.id, foo.name FROM foo WHERE foo.id = 1 LIMIT 1
The second transaction, which performs identical actions issues two queries:
SELECT 1 FROM foo WHERE foo.id = 1
SELECT foo.name FROM foo WHERE foo.id = 1