(Yeah, ok, that description made a /lot/ of sense.)
Here's the gist of what I'm trying to do...
class Invoice(Entity):
type = Field(Text) # 'SELLER' or 'BUYER'
items = OneToMany('Item') # List of items on this invoice
# How to specify 'inverse' for this??
class Item(Entity):
seller_invoice = ManyToOne('Invoice')
buyer_invoice = ManyToOne('Invoice')
Each item has a buyer and a seller. Each gets a separate invoice. The invoice
might contain several items for each buyer and seller.
I can't figure out how to specify the 'inverse=' on the OneToMany since it
might be referring to either field on the Item (depending on 'type')?
Clear as mud?
Thanks,
Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---