Patches item #1675319, was opened at 2007-03-07 01:31
Message generated for change (Comment added) made by phd
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: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Leandro Lucarella (llucax)
>Assigned to: Oleg Broytmann (phd)
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: Oleg Broytmann (phd)
Date: 2007-03-14 19:39
Message:
Logged In: YES
user_id=4799
Originator: NO
Applied in the revisions 2407-2410. Thank you!
----------------------------------------------------------------------
Comment By: Leandro Lucarella (llucax)
Date: 2007-03-07 01: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-07 01:32
Message:
Logged In: YES
user_id=240225
Originator: YES
File Added: test.inherit.py
----------------------------------------------------------------------
Comment By: Leandro Lucarella (llucax)
Date: 2007-03-07 01: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
|