Is there a way to create One-To-One auto referential relationships?

I wonder whether it is possible to create something like this:

class Position(Entity):
    next_position = OneToOne('Position')      # can be a link to a
Position_id or None
    previous_position = OneToOne('Position')

actually this example doesn't work, because as explained in the docs,
every OneToOne relationships needs a OneToMany field on the target
table.

-- 

My blog on bioinformatics (now in English): http://bioinfoblog.it

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to