Patches item #1675319, was opened at 2007-03-06 19:31
Message generated for change (Comment added) made by llucax
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1675319&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Leandro Lucarella (llucax)
Assigned to: Nobody/Anonymous (nobody)
Summary: DatabaseIndex.get() fix and simplification.
Initial Comment:
This is a reimplementation of DatabaseIndex.get() using selectBy() + getOne().
The current implementation had some issues with inheritance and when passing objects if a member of the index was a ForeingKey (passing something=something fails where somethingID=something.id works).
This implementations is:
1) Simpler.
2) Smarter. Don't reinvent the wheel (uses existing, more tested and more robust functions).
3) Backward compatible.
Attached is the patch, and 2 testcases: one testing Inheritance and the other object arguments passing.
----------------------------------------------------------------------
>Comment By: Leandro Lucarella (llucax)
Date: 2007-03-06 19:35
Message:
Logged In: YES
user_id=240225
Originator: YES
File Added: DatabaseIndex.get-selectBy.getOne.patch
----------------------------------------------------------------------
Comment By: Leandro Lucarella (llucax)
Date: 2007-03-06 19:32
Message:
Logged In: YES
user_id=240225
Originator: YES
File Added: test.inherit.py
----------------------------------------------------------------------
Comment By: Leandro Lucarella (llucax)
Date: 2007-03-06 19:32
Message:
Logged In: YES
user_id=240225
Originator: YES
File Added: test.ids.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1675319&group_id=74338
|