IndirectReferenceSet.find().something() produces non-working queries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
In Progress
|
Medium
|
Thomas Herve |
Bug Description
Index: tests/store/base.py
=======
--- tests/store/base.py (revision 116417)
+++ tests/store/base.py (working copy)
@@ -3111,6 +3111,26 @@
+
+ def test_indirect_
+ foo = self.store.
+ bar = self.store.get(Bar, 300)
+
+ foo.bars.add(bar)
+ foo.bars.
+
+ items = []
+ for bar in foo.bars:
+ items.append(
+ items.sort()
+
+ self.assertEqua
+ (100, "hoho"),
+ (200, "hoho"),
+ (300, "hoho"),
+ ])
+
+
def test_indirect_
foo = self.store.
bar300 = self.store.get(Bar, 300)
Related branches
- Gustavo Niemeyer: Needs Fixing
- Storm Developers: Pending requested
-
Diff: 187 lines (+92/-15)5 files modifiedstorm/databases/mysql.py (+9/-3)
storm/databases/postgres.py (+11/-4)
storm/expr.py (+43/-7)
storm/store.py (+1/-1)
tests/store/base.py (+28/-0)
Changed in storm: | |
assignee: | nobody → Thomas Herve (therve) |
importance: | Undecided → Medium |
milestone: | none → 0.19 |
status: | New → In Progress |
Changed in storm: | |
milestone: | 0.19 → 0.20 |
Changed in storm: | |
milestone: | 0.20 → 0.21 |
Changed in storm: | |
milestone: | 0.21 → 0.22 |
Changed in storm: | |
milestone: | 0.22 → 0.23 |
Changed in storm: | |
milestone: | 0.23 → none |
Setting database.DEBUG=True I get (sqlite backend, fails the same way with mysql, too):
SELECT foo.id, foo.title FROM foo WHERE foo.id = ? LIMIT 1 (20,)
SELECT bar.foo_id, bar.id, bar.title FROM bar WHERE bar.id = ? LIMIT 1 (300,)
INSERT INTO link (bar_id, foo_id) VALUES (?, ?) (300, 20)
UPDATE bar SET title=? WHERE link.foo_id = ? AND bar.id = link.bar_id (u'hoho', 20)