[nhusers] Re: Can composite elements have read only properties

2008-10-23 Thread Keith Bloom
Hi Sean, Thanks but I tried that and NH attempted to insert in to the column. It may very well be that a composite element shouldn't be read only. Keith. On 22 Oct, 16:31, "Sean Carpenter" <[EMAIL PROTECTED]> wrote: > To have it populated from the DB but not persisted, you should be able to > s

[nhusers] Re: Can composite elements have read only properties

2008-10-22 Thread Sean Carpenter
To have it populated from the DB but not persisted, you should be able to set insert="false" and update="false" on the element in the mapping. On Wed, Oct 22, 2008 at 5:03 AM, Keith Bloom <[EMAIL PROTECTED]> wrote: > > Sorry for the confusion and I'm starting to come to the same > conclusion tha

[nhusers] Re: Can composite elements have read only properties

2008-10-22 Thread Keith Bloom
Sorry for the confusion and I'm starting to come to the same conclusion that prices should be a class. For me this has now spun off in to an exploration to find out how a collection of composite-elements work in NH. It would be great if I could have a property that NH populated from the database

[nhusers] Re: Can composite elements have read only properties

2008-10-20 Thread Jason Meckley
I'm confused now. you can set read-only access for the code by using nosetter access types and still allowing NH to hydrate the object. if you mean NH should not populate the element, than your class (not component) is readonly (mutable = false) or you don't map the value in NH. If the access is m

[nhusers] Re: Can composite elements have read only properties

2008-10-20 Thread Keith Bloom
Hi Jason, Thanks for the idea but NHibernate still attempts to insert a value but this time in the field instead of the property. I've also tried setting generated="always" but this is ignored. Do you know if the property settings for composite-elements and classes are the same? Thanks, Keith

[nhusers] Re: Can composite elements have read only properties

2008-10-17 Thread Jason Meckley
just set the access attribute to nosetter.camelcase or whatever naming strategy you use. On Oct 17, 10:19 am, Keith Bloom <[EMAIL PROTECTED]> wrote: > Hello, > > Does anyone know if this: > > > // ... Some properties .. > > > > > > > >