If the lists are likely to be small you can use a PickleCol that
stores a python list.

On 4/9/07, Aaron Digulla <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Is it possible to store and load an ordered list of items with SQLObject?
>
> In my specific case, I have a recursive data structure:
>
> class Knowledge(SQLObject):
>     parent = ForeignKey('Knowledge')
>     children = MultipleJoin('Knowledge', joinColumn='parent_id',
> orderBy='pos')
>     pos = IntCol(default=0)
>
> How do I make sure "pos" is assigned the correct value when I add
> children to a node? Should I override _set_parent() or addChildren()?
>
> Or should I manage the list of children myself using a "hidden" field
> which implements the DB access to load all children?
>
> Regards,
>
> --
> Aaron "Optimizer" Digulla a.k.a. Philmann Dark
> "It's not the universe that's limited, it's our imagination.
> Follow me and I'll show you something beyond the limits."
> http://www.pdark.de/
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> sqlobject-discuss mailing list
> sqlobject-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to