But what if I want both to be insertable/updateable? It seems to me that ReportID would "just work" without a [Property] attribute. That is, if I specify ReportID as the BelongsTo, why wouldn't the ReportID .net property do what would be expected?
On Apr 1, 12:35 pm, Tyler Burd <[email protected]> wrote: > You can mark one as Insert=false and Update=false like this: > > [Property(Insert = false, Update = false)] > public int ReportID { get; set; } > > That tells NHibernate/ActiveRecord to skip over that property at insert or > update time. It will still load the value when the entity is loaded from the > db. > > Does that help? > -tyler > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of khaavren of > castlerock > Sent: Wednesday, April 01, 2009 8:53 AM > To: Castle Project Users > Subject: [Property] on [BelongsTo] association column > > Hello, > > I'm wondering if there is something I need to do to get the following > to work without creating undesirable results: > > [BelongsTo("ReportID")] > public virtual Report Report { get; set; } > > [Property] > public int ReportID { get; set; } > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
