assuming this topic would never get addressed, I just tried to re-ask the question, differently, i suppose: http://groups.google.com/group/nhusers/browse_thread/thread/c0d3079853da049d
As I point out in that post, there are 2 scenarios that a Note can be added to a Ticket: either when the ticket is created & new itself, or when the ticket exists already and a Note is being added. In the server, this translates into the possibility of note.Ticket being null (scenario #2). -- Obviously, if my Mapping has note.Ticket mapped as the many-to-one, this needs to be populated, so I'm OK with getting the ticket instance from the Session/DB before trying to save the new note. But I'm unclear as to HOW I save that new note: Session.Save(noteWithLoadedTicket) or Session.Merge(loadedTicketWithNewNoteAdded) the second problem is that note.TicketID is something that NHibernate doesn't need (or maybe want?), but RIA Services does. I don't really want to make this a calculated field off of Ticket, but I'm hoping there is a way to have NHibernate populate this value. If nothing else, I would think that I could map it as an always-generated property, so when NHibernate inserts a Note (populating TicketID column with note.Ticket.TicketID), I won't have to manually update the note.TicketID value before sending the entity back to the client? -- 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.
