Hello again,

> class Container(DBObject, InheritableSQLObject):
>     items = RelatedJoin('DBItem', addRemoveName='Item')
>
> i have this (sqlobject)  that make the relation with container and DBitem
> and create addItem, but i dont know how make something to make addItem in
> storm.

You do something like this:

  class Item(Storm):
      ...
      id = Int(primary=True)
      container_id = Int()

  class Container(Storm):
      ...
      id = Int(primary=True)
      items = ReferenceSet(id, Item.container_id)

  container = Container()
  item = Item()
  container.items.add(item)

-- 
Gustavo Niemeyer
http://niemeyer.net

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to