[nhusers] Bizarre error when using NHibernate, IPreInsertEventListener, Oracle, batching and sequences

2011-05-06 Thread Krzysztof Koźmic
I'm using Oracle database. I have a IPreUpdateEventListener and IPreInsertEventListener which set CreatedBy and UpdatedBy properties on some of the entities. Those properties point to another entity Person which is assigned in the listeners via Session.Load<> this all used to work quite nice

Re: [nhusers] Re: mapping via and where clause (bug in NHibernate?)

2011-03-25 Thread Krzysztof Koźmic
to > > the formula of Ayende But im not sure if it might work > > > 2011/3/25, Fabio Maulo mailto:fabioma...@gmail.com>>: > >> If you use that solution, please have a look to WARNING. > > >> 2011/3/25 Krzysztof Koźmic mailto:kr

[nhusers] mapping via and where clause (bug in NHibernate?)

2011-03-25 Thread Krzysztof Koźmic
So I have a one-to-many tables in database that looks like the following (I'm on NHibernate 3.1): blog id title author comments id blog_Id languageid comment and I want to map it to a *single* class with *single* comment property that maps to text column in comment

Re: [nhusers] Re: Castle versus LinFu versus Spring

2010-09-11 Thread Krzysztof Koźmic
Ditto sent from my HTC Desire On 12/09/2010 11:00 AM, "sbohlen" wrote: Without going into too much detail here, the reason for providing the ability for users to select their proxy engine of choice had much less to do with performance, features, or other aspects of such a choice and more to do

Re: [nhusers] Castle trouble ...

2010-03-31 Thread Krzysztof Koźmic
why are you using old Castle assemblies in new project? 2010/3/31 Paulo Quicoli : > Check you VS project references out > > 2010/3/31 Kris-I >> >> Hello, >> It's not really a trouble NHibernate but I do this : >> This work : >> IWindsorContainer container = new WindsorContainer(); >> This no

Re: [nhusers] NHibernate ProxyGenerators

2009-11-17 Thread Krzysztof Koźmic
Soon my friend, very soon. :-) Fabio Maulo wrote: > perhaps, and I mean perhaps, Castle.DynamicProxy2 should be released > with this so important fix. > > 2009/11/17 Krzysztof Koźmic <mailto:krzysztof.koz...@gmail.com>> > > Bill, Vincent, > > Wit

Re: [nhusers] NHibernate ProxyGenerators

2009-11-17 Thread Krzysztof Koźmic
Bill, Vincent, With trunk version of Castle Dynamic Proxy it should not be an issue to run in the medium trust (ie, you don't need to pre-generate your lazy-loading proxies). The change that Martijn mentions in his post got incorporated into the sourcebase some time ago (best part is - it impro

[nhusers] Re: Castle or Linfu

2009-08-10 Thread Krzysztof Koźmic
objects. At any rate so far the performance times are the > same as they were before so its not slower or faster. I might look at > the type caching to fix the castle problem if linfu doesnt work out > anyhow. > > thanks > > scott > > On Aug 10, 1:13 pm, Krzysztof Koźmic

[nhusers] Re: Castle or Linfu

2009-08-10 Thread Krzysztof Koźmic
Hey, This is actually not a Castle Dynamic Proxy issue per se. That's a result of... BCL's unfortunate implementation of algorithm that looks for name collisions in generated assembly. The algorithm is not linear, so you see the performance decrease you described, as there are more and more t

[nhusers] Insert or Update child when Id is not known

2009-05-20 Thread Krzysztof Koźmic
Hi, Let's say I have the following model: class Person class Pet Person can have many pets Pet has a unique name. Now I get a list of Pet's names and I have to Create a person, assign Pets to it, and save it to the DB. But there's a twist - There may or may not be a pet with given name. So

Re: SV: [nhusers] Superfluous update?

2009-05-12 Thread Krzysztof Koźmic
lol, it certainly isn't OK, I'll look into it. thanks Krzysztof Fabio Maulo pisze: > Ah... > 4) a remove an existing Pet (mean remove only the association, the > animal stay alive). > > The life of an persistent-layer's developer is not so easy ;) > > 2009/5/12 Fabio Maulo mailto:fabioma...@gm

Re: SV: [nhusers] Superfluous update?

2009-05-11 Thread Krzysztof Koźmic
Thanks guys for the links, I've read them carefully. However I'm still not convinced when it comes to the additional update. I see no reason why what it does cant be performed in the insert in the first place. As in the Roger's link - it may even be reasonable to put a not-null="true" on the asso

Re: SV: [nhusers] Superfluous update?

2009-05-11 Thread Krzysztof Koźmic
and mark the collection with inverse=true. > > > Från: nhusers@googlegroups.com [nhus...@googlegroups.com] för Krzysztof > Koźmic [krzysztof.koz...@gmail.com] > Skickat: den 11 maj 2009 21:52 > Till: nhusers@googlegroups.com > Ämne: [nhus

[nhusers] Superfluous update?

2009-05-11 Thread Krzysztof Koźmic
Given the following classes/mappings: public class Person { public virtual Guid Id { get; protected set; } private readonly ISet _pets = new HashedSet(); public virtual ISet Pets { get { return _pets; } } }

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

2009-05-08 Thread Krzysztof Koźmic
d mistakenly thought > about ActiveRecord) > > > 2009/5/8 Krzysztof Koźmic <mailto:krzysztof.koz...@gmail.com>> > > Germán, > > please expand. And I actually want to do write-only not read-only. > Is there a switch for that? > we are talking abo

[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

[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 <mailto:krzysztof.koz..

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

2009-05-08 Thread Krzysztof Koźmic
> private. > > On May 8, 8:38 am, Krzysztof Koźmic > wrote: > >> 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. >

[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 unn

[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: NHibernate in Action

2009-02-06 Thread Krzysztof Koźmic
does it have at least appendinx on NHIbernate 2.0? Or is there 2nd edition coming out anytime soon? ;) other than that, congratulations on the book! Krzysztof Tobes pisze: > Oops. > > Pretty pictures **here**: > > http://www.tobinharris.com/2009/2/5/nhibernate-in-action-has-arrived > > > > > >

[nhusers] Re: Default constructor requirement.

2008-12-30 Thread Krzysztof Koźmic
Do you mean proying dependencies for lazy loading? so that instead of CustomerName instance I get a proxy? Can you elaborate on that? I'm not sure I understand your answer. Krzysztof Ayende Rahien pisze: > Proxies > > On Tue, Dec 30, 2008 at 11:33 PM, Krzysztof Koźmic > mai

[nhusers] Re: Default constructor requirement.

2008-12-30 Thread Krzysztof Koźmic
Greg Young pisze: > Fabio this discussion has already happened and I prefer to not restate > the same positions as before but ... in terms of insuring correctness > assuming that data from the database is correct is a nefarious at best > course of action. > True, especially if you consider schem

[nhusers] Re: Default constructor requirement.

2008-12-30 Thread Krzysztof Koźmic
tor is > more than enough. > > > The end: > If you want work a lot use a specific tuplizer for each entity class > to use a specific ctor. > If you don't want work a lot use a private default ctor. > > > 2008/12/30 Krzysztof Koźmic <mailto:krzysztof.koz...@gmai

[nhusers] Re: Default constructor requirement.

2008-12-30 Thread Krzysztof Koźmic
ze: > http://fabiomaulo.blogspot.com/2008/11/entities-behavior-injection.html > > 2008/12/29 Krzysztof Koźmic <mailto:krzysztof.koz...@gmail.com>> > > > I'm thinking, why actually NHibernate require entities to have > parameterless constructor. > I know that I can make

[nhusers] Default constructor requirement.

2008-12-30 Thread Krzysztof Koźmic
I'm thinking, why actually NHibernate require entities to have parameterless constructor. I know that I can make it non-public, but still, for a lot of entities it simply smells. For example, it doesn't make sense to have a customer without name, or Order without Item. To throw a buzzword at yo