Hi,

I'm faced with a situation where I have

 - a 1:n-relationship between Document and DocumentRevision-objects
 - want to delegate most properties of Document to DocumentRevison, which 
means I need an "active" revision. 

Modelling that active_revision as "normal" ManyToOne-relationship on the 
document gets me (understandably) into circular-dependency-hell.

Now I know that you can create deferred constraints in some databases 
as "deferrable" which means you can create circular dependencies that must 
only be valid at commit-time, not while inserting.

See e.g. 

http://www.network-theory.co.uk/docs/postgresql/vol1/CREATETABLE.html

for PG doing this.

Is there any way to exploit this kind of foreign key reference via elixir, or 
maybe SA itself?

Diez

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