[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Fabio Maulo
in trunk. 2009/5/8 Krzysztof Kozmic > Hi, > > Sorry if the title is confusing, I didn't know how to better describe what > I want to do in few words. > > Here's longer version. > > Given I have entity like this: > > public class Person > { > public virtual IList Pets {get;set;} > publ

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Fabio Maulo
all this stuff is natively supported on NH2.1.0 using access="readonly" 2009/5/8 Germán Schuager > As an advice, take care about where you access the property and the > underlying collection fetching strategy because it can bite you (it has with > me :)) > > > 2009/5/8 Krzysztof Koźmic > >> Ge

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Germán Schuager
As an advice, take care about where you access the property and the underlying collection fetching strategy because it can bite you (it has with me :)) 2009/5/8 Krzysztof Koźmic > Germán, > > yes, that is exactly what I needed. Thanks. > Clean and simple. > > Krzysztof > > Germán Schuager pisze

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Krzysztof Koźmic
Germán, yes, that is exactly what I needed. Thanks. Clean and simple. Krzysztof Germán Schuager pisze: > http://blog.schuager.com/2008/12/nhibernate-read-only-property-access.html > > Is that what you were looking for? > > (I've confused the list with the Castle one, and mistakenly thought > ab

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Germán Schuager
http://blog.schuager.com/2008/12/nhibernate-read-only-property-access.html Is that what you were looking for? (I've confused the list with the Castle one, and mistakenly thought about ActiveRecord) 2009/5/8 Krzysztof Koźmic > Germán, > > please expand. And I actually want to do write-only no

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Krzysztof Koźmic
epitka, please read the first post in the thread. then we'll talk. Krzysztof. epitka pisze: > Who mentioned setter or property, you can have a private readonly > FIELD. > > On May 8, 8:49 am, Krzysztof Koźmic > wrote: > >> Than maybe you should read the first message in this thread again. >>

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Krzysztof Koźmic
Germán, please expand. And I actually want to do write-only not read-only. Is there a switch for that? we are talking about NH, aren't we? Krzysztof Germán Schuager pisze: > In NH you'd do: access="readonly" > > 2009/5/8 Krzysztof Koźmic > > > Than maybe

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread epitka
Who mentioned setter or property, you can have a private readonly FIELD. On May 8, 8:49 am, Krzysztof Koźmic wrote: > Than maybe you should read the first message in this thread again. > > I have a property that has no backing field, that I want to map to a > column in DB, but it is readonly, so

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Germán Schuager
In NH you'd do: access="readonly" 2009/5/8 Krzysztof Koźmic > Than maybe you should read the first message in this thread again. > > I have a property that has no backing field, that I want to map to a column > in DB, but it is readonly, so it should not have a setter, but then NH will > throw

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Krzysztof Koźmic
Than maybe you should read the first message in this thread again. I have a property that has no backing field, that I want to map to a column in DB, but it is readonly, so it should not have a setter, but then NH will throw and cfg.Configure() I want it to be able to PUSH the property to the d

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread epitka
I am not following what is inconsistent? You either have persistable attribute in your entity or you don't. If you have than you map it. If you don't wan't to expose it to the outside world you make it private. On May 8, 8:38 am, Krzysztof Koźmic wrote: > Why would I want such duplication and in

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Krzysztof Koźmic
Why would I want such duplication and inconsitency in my model? epitka pisze: > why are you fighting it. Make a field private and let it be selected. > Would that work? > > On May 8, 8:17 am, Krzysztof Koźmic > wrote: > >> As I think my inline answer went largely unnoticed, I'll try my luck an

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread epitka
why are you fighting it. Make a field private and let it be selected. Would that work? On May 8, 8:17 am, Krzysztof Koźmic wrote: > As I think my inline answer went largely unnoticed, I'll try my luck and > ask again (sorry to those who seen it already): > > Isn't there any other way? I thought

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Krzysztof Koźmic
As I think my inline answer went largely unnoticed, I'll try my luck and ask again (sorry to those who seen it already): Isn't there any other way? I thought this is not such uncommon scenario, so people must deal with it somehow... Krzysztof Krzysztof Kozmic pisze: > Thanks Ken > > >>> egoz..

[nhusers] Re: How to map Property I don't want setter for.

2009-05-08 Thread Ken Egozi
create a "CalculatedHasPets" private property, map it to HasPets in the DB. and do not map the HasPets property to anything. anywhoo this looks a bit bizzarre to my On Fri, May 8, 2009 at 12:24 PM, Krzysztof Kozmic wrote: > Hi, > > Sorry if the title is confusing, I didn't know how to better de