Hey Wilson,
> Is it possible to use storm to handle self-referencing tables ?
> I have made a trial with the following code:
>
> class Category(object):
> __storm_table__ = "category"
> id = Int(name="id_category", primary=True)
> name = Unicode()
> id_parent = Int()
> parent = Reference(id_parent, Category.id)
>
> def __init__(self, name):
> self.name = name
(...)
> Is there any way to make this work?
Yep. Try this:
parent = Reference(id_parent, id)
--
Gustavo Niemeyer
http://niemeyer.net
--
storm mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/storm