From: Imri G. <lor...@gm...> - 2010-02-28 15:13:47
Heya
When creating classes with circular dependencies (via sqlobject-admin),
there's a warning. This has been discussed before. While I don't propose a
general solution to the problem, a simple workaround for self referring
classes may be used.
In command.py, line 211 (sqlobject 0.12.1, in findReverseDependencies() )
change from:
if other not in depended:
to:
if other is not cls and other not in depended:
In the case of only self-referring classes, the ordering still makes sense
this way.
Cheers,
Imri
--
Imri Goldberg
--------------------------------------
http://plnnr.com/ - automatic trip planning
http://www.algorithm.co.il/blogs/
--------------------------------------
-- insert signature here ----
On Sun, Feb 28, 2010 at 05:13:39PM +0200, Imri Goldberg wrote:
> In command.py, line 211 (sqlobject 0.12.1, in findReverseDependencies() )
> change from:
>
> if other not in depended:
>
> to:
>
> if other is not cls and other not in depended:
>
> In the case of only self-referring classes, the ordering still makes sense
> this way.
Thank you, I'll add it.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
On Sun, Feb 28, 2010 at 05:13:39PM +0200, Imri Goldberg wrote:
> In command.py, line 211 (sqlobject 0.12.1, in findReverseDependencies() )
> change from:
>
> if other not in depended:
>
> to:
>
> if other is not cls and other not in depended:
Committed in the revision 4135 in the trunk. Thank you!
Oleg.
--
Oleg Broytman http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.