Thanks Nexus!! I know it can be handeled in code as I can create two entities where I can fetch values and can create a common entity out of it, but it require me to define multiple entities and also I have to define relations etc.
What I was wondering was if I have some thing like SQL where in I can straight away specify multiple columns and can get them directly into one entity. Thanks for the help! Sachin On Jul 25, 2:02 pm, Nexus <tommar...@gmail.com> wrote: > Sachin, > > This seems like a code smell to me, if the twoentitytypes, now is > one, have a different meaning, try modelling them accordingly. > > In nhibernate an object of a given type, is only once per primary key > in de session (identitymap). > > Kind regards > > PS: If you think i didn't understand the question, elaborate on the > situation more please. > > On Jul 22, 12:23 pm, Sachin <sachingupta1...@gmail.com> wrote: > > > > > Hi > > I am facing a problem, while using objects received from database. > > I have 2 collections of anentity, which have objects fetched from > > database which can be same as in they might have same primary key but > > can have different values in few columns. > > I found that when I update object in collection A, object with same > > primary key inentityB also gets updated although it have been > > fetched separately. > > > Due to which my business logic get scrambled. > > Please suggest whether I shall specify some attributes onentityor > > some different approach have to be followed. > > > Thanks > > Sachin- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---