I have 2 tables -
1) Nodes
2) Links

Links connect 2 nodes - as Source and Destination.
For Link to be saved - it's Source and Destination notes must be non-
null.
Each node can have multiple Links.

Now in my object graph (that is created programmatically) I want to
call Save on teh root node and have it cascade the save down Links and
Nodes.

I am not sure how to assign the cascades.
I tried assigning
- (cascade="none") for Links collection of the source node
- (cascade="none") for the Source and Destination nodes of the Link
- (cascade="save-update") for the Destination node

but it gives me the error that Link object should be saved before
flushing. It's null reference or transient :(

I'm at my wits' end as to how to save this kind of a potentially
continuous graph.
Since NHibernate should save the Nodes before it saves teh links
(since Links depend on the Nodes for their FKs).

Please HELP!!!!

Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to