[nhusers] Re: Can I disable automatic updating of dirty objects?

2009-08-23 Thread Oskar Berggren
2009/8/22 kurtharriger : > > I also would like to go on the record as saying that I too believe > dirty checking is a a bad idea and probably should be considered a bug > because it violates encapsulation boundaries. I disagree with your terminology. I consider a bug to be a "violation of specifi

[nhusers] Re: Problem using Unity as a reflection optimizer and changing a "one-to-many" to a "composite-element" mappings

2009-08-23 Thread Fabio Maulo
2009/8/23 Dawid > > Is the the expected behavior, or is there something that should do > differently? > The second. -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this

[nhusers] Re: Problem using Unity as a reflection optimizer and changing a "one-to-many" to a "composite-element" mappings

2009-08-23 Thread Fabio Maulo
where you have shared your code about the reflection optimizer using Unity ? 2009/8/23 Dawid > > Hi, > > I've written some code to use Unity as a DI container inside > NHibernate and all seemed to be well. > > Today I tried to change a one-to-many mapping to a composite-element > inside a bag an

[nhusers] Problem using Unity as a reflection optimizer and changing a "one-to-many" to a "composite-element" mappings

2009-08-23 Thread Dawid
Hi, I've written some code to use Unity as a DI container inside NHibernate and all seemed to be well. Today I tried to change a one-to-many mapping to a composite-element inside a bag and I now get an exception in NHibernate.Tuple.PocoInstantiator.Instantiate stating that the entity has no defa

[nhusers] Re: Calling parent properties from inherited constructors

2009-08-23 Thread Fabio Maulo
the code please 2009/8/21 Seth Goldstein > > > We have run into a problem with the latest version of NHibernate that > has us totally stumped. We have an inherited table schema using > joined-subclasses in the mapping file. And the business layer matches > this schema. In the constructor of o

[nhusers] Re: Can I disable automatic updating of dirty objects?

2009-08-23 Thread kurtharriger
I also would like to go on the record as saying that I too believe dirty checking is a a bad idea and probably should be considered a bug because it violates encapsulation boundaries. The leakage of mutable references makes it difficult to verify that business rules always remain valid when chang

[nhusers] Calling parent properties from inherited constructors

2009-08-23 Thread Seth Goldstein
We have run into a problem with the latest version of NHibernate that has us totally stumped. We have an inherited table schema using joined-subclasses in the mapping file. And the business layer matches this schema. In the constructor of one of the inherited classes, it tries to reference a p

[nhusers] Re: Nhibernate pretty sql command ?

2009-08-23 Thread dinkelburt
I thought I saw an enhancement request get completed in 2.1 that turned this on by default, is that right? On Aug 18, 4:06 pm, Jim Tanner wrote: > Thanks Tuna and Fabio it was very helpfull. > > On 18 août, 17:56, Fabio Maulo wrote: > > > truethe "hibernate" was removed. > > > 2009/8/18 Jim Ta

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
> @ChrisHolmes and Belvasis : Are you writting / have you written a > winform nh framework from scratch or can u point me to an existing > framework ? I am in the process of evaluating potential ways to use NHibernate in a WinForm application. I haven't written anything yet, just been thinking,

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
Belvasis, Thank you for the detailed post sir! This is so very good! I do not know if this is something I will use, but it at least gives me a very clear implementation pattern to analyze. It gives me a lot to think about, which is good! Thank you sir! -Chris On Aug 23, 10:55 am, Belvasis wr

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Wojciech Wieronski
Chris I feel your pain. I had the same issues when starting with NH and a winform app. Here is my experience. Hope it helps. A simple Repo. public class HealthcareProfessionalRepository : IHealthcareProfessionalRepository { ISessionFactory _sessionFactory; public HealthcareP

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
> Again, you should really take a close look at the unhaddins impl, run the > samples, etc.  I was in the same boat as you some time ago.  And managed to > figure it out.  It can't be that hard can it? I am definitely going to take a look at the implementation. It's just time consuming; downl

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
well very well and good proposals. We need an help in NH-Forge you all are candidate to help... this is the proposal of www.nhforge.org Perhaps we should re-new the initial spirit of the site FOR NHibernate community http://nhforge.org/content/WelcomeMessage.aspx 2009/8/23 Belvasis > Yes thats t

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Belvasis
Yes thats true and i will do it, if i'm finished with it :-) But in general would n't it be a good idea to have a place at NHForge where new users can quickly find informations for specific themes? The current Patterns & Practices section is a little short. In the end some sort of link collection w

[nhusers] NH-Forge Bio

2009-08-23 Thread Fabio Maulo
Hi all.All www.nhforge.org users are invited to complete his own page (the Bio, Announcements, shared favorites, shared feeds and so on). Let other users know you, your blog, your activities (in/out nh-forge through Announcements). Thanks. Fabio Maulo --~--~-~--~~~---~

[nhusers] Re: Work At Home - Earn $30,000 Per Month

2009-08-23 Thread Sidar Ok
may be that working at home is actually working w/nhibernate :) On Sun, Aug 23, 2009 at 5:12 PM, Tuna Toksoz wrote: > Who let the dogs in? :) > > Tuna Toksöz > Eternal sunshine of the open source mind. > > http://devlicio.us/blogs/tuna_toksoz > http://tunatoksoz.com > http://twitter.com/tehlike

[nhusers] Re: use an sql-query to load an entity

2009-08-23 Thread Stefan Steinegger
So now I start to understand. You have an entity that does not map to a table. Instead you write a custom sql to load it from any other table. I don't have much experience with custom sql queries and can't tell you whats going wrong. But to identify the problem you should take a look at the gener

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
Belvasis,If you need a place where share a post about another solution than CpBT let me know. You can post your solution and code in NH-Forge, really. More than one option is always welcome and in general people sharing his code and his experience are welcome in NH-Forge. 2009/8/23 Belvasis > I

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Belvasis
I know this blog and the video and it is fine. As I said I will rethink the CpBT. Maybe the name "UseCase" from my last post is a little misleading. The "UseCase" is more a "ICommand" compared to the example. It is

[nhusers] Re: How do I map a subclass of a subclass?

2009-08-23 Thread Jason Dentler
One mapping does not mean one table. I don't have my code from the office available, but if I remember how that database turned out, you'll get three tables. Each one builds on the one below. The Person table will store ID and Name for all three types. The BoardMember table will store ID and Type f

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
did you see the video ?Now have a look on how look the IRepository and the Model (the UseCase) http://jfromaniello.blogspot.com/2009/08/nhibernate-and-wpf-cpbt.html All is working with MVVM databing, Observable collection, erro

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
Belvasis,have a look to the video at the bottom of the post http://jfromaniello.blogspot.com/2009/08/nhibernate-and-wpf-viewmodels-and-views.html 2009/8/23 Belvasis > Hm i tried to write a winform framework (mostly) independend of NH. My > attemp was that the hole session thing > is transparent

[nhusers] Re: How do I map a subclass of a subclass?

2009-08-23 Thread Mikael Henriksson
Thanks Jason, that means however that I need to store everything in the Person table which is what I was trying to avoid. Don't get me wrong if anything has to go it's the table structure. Guess I'll bite the bullet for now and come back later. On Sun, Aug 23, 2009 at 7:11 PM, Jason Dentler wrote:

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Belvasis
Hm i tried to write a winform framework (mostly) independend of NH. My attemp was that the hole session thing is transparent for the developer, so that all one has to know about NH is the ICriteria interface. So i have a IPersistenceService that is resolved by IoC. The Service has a method OpenSess

RES: [nhusers] Re: Paging with SQL 2000

2009-08-23 Thread Renato Duran - Pessoal
Ok guys, thanks for the answers. I'm not criticizing, I've just asked because I'm new at NH and maybe I was doing something wrong. Best regards, Renato Duran De: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] Em nome de Fabio Maulo Enviada em: sexta-feira, 21 de agosto de

[nhusers] Re: How do I map a subclass of a subclass?

2009-08-23 Thread Jason Dentler
Unfortunately, I've done something similar at work recently. public class PersonMapping : ClassMap { public PersonMapping() { Id(x => x.ID).GeneratedBy.GuidComb(); Map(x => x.Name).Not.Nullable(); JoinedSubClass("ID", sm => MapBoardMember(

[nhusers] Re: How do I map a subclass of a subclass?

2009-08-23 Thread Tuna Toksoz
And I know the post is a bit old. Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Sun, Aug 23, 2009 at 7:54 PM, Tuna Toksoz wrote: > >1. DiscriminateSubClassesOnColumn("Type") >2. .SubCl

[nhusers] Re: How do I map a subclass of a subclass?

2009-08-23 Thread Tuna Toksoz
1. DiscriminateSubClassesOnColumn("Type") 2. .SubClass(m => 3. { 4. m.Map(x => x.BProperty); 5. m.SubClass(m => 6. { 7. m.Map(x => x.CProperty); 8. }); 9. }); from http://blog.jagregory.com/2009/01/05/fluent-nhibernate-subclass-syntax-changes/

[nhusers] Re: How do I map a subclass of a subclass?

2009-08-23 Thread Mikael Henriksson
I tried but they are clueless :) Seriously though I was suggested it "might" be possible by Paul from fluent and to ask here. He suggested it might be "achievable" through join. On Sun, Aug 23, 2009 at 6:38 PM, Tuna Toksoz wrote: > Perhaps you should ask in Fluent nhibernate group < > fluent-nhi

[nhusers] Re: How do I map a subclass of a subclass?

2009-08-23 Thread Tuna Toksoz
Perhaps you should ask in Fluent nhibernate group < fluent-nhibern...@googlegroups.com>, Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Sun, Aug 23, 2009 at 6:54 PM, Mikael Henriksson wrote: > I'l

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Tuna Toksoz
No I am not sure, I may be wrong. Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Sun, Aug 23, 2009 at 7:27 PM, Jim Tanner wrote: > > @Tuna : I don't find any mention of winform around caliburn bu

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Jim Tanner
@Tuna : I don't find any mention of winform around caliburn but i may be mistaken. Are u sure they mix well before i digg further ? @Carlos : By any chance did u try the winform sample inside NhContrib (not unhaddins)? Do u remember getting it work or was it broken ? @ChrisHolmes and Belvasis :

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
Carlos you know demand is the more easy thing to do... the hard one is think or share something. 2009/8/23 Carlos cubas > I think foremost, you should tone down your demanding attitude. Everybody > is willing to help you just not with you demanding such attention. > > Again, you should real

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Carlos cubas
I think foremost, you should tone down your demanding attitude. Everybody is willing to help you just not with you demanding such attention. Again, you should really take a close look at the unhaddins impl, run the samples, etc. I was in the same boat as you some time ago. And managed to fi

[nhusers] How do I map a subclass of a subclass?

2009-08-23 Thread Mikael Henriksson
I'll start with some code! public class Person { public virtual int Id { get; private set; } public virtual string FirstName { get; set; } public virtual string LastName { get; set; } } public class BoardMember : Person { public virtual Board B

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
> > If you are all new to this, don't try to invent everything from > scratch in your first application. Either use the patterns and > libraries already mentioned or, if you want to really understand and > develop everything yourself, start simple. Yes! Because understanding is the most importan

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
On Aug 22, 5:32 pm, José Romaniello wrote: > 2009/8/22 ChrisHolmes > > > Why don't make any sense to you? Implementation. How things get wired together. Who calls who. How do dependencies get resolved. What does an actual unit of work look like in code at a high level. > > > Or multiple se

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
Blevasis, This is a great explanation of the way you're doing it. But again, I don't understand it. Specifically, I don't understand the details of how it is implemented. Example: The Calling Context and the Persistence Context. You say: > "Every > usecase may instantiate it's own > Persistence

[nhusers] Re: issue with inverse=true

2009-08-23 Thread zihotki
Hi, Could you please post complete mapping? It's very hard to understand the problem with the parts of mappings you wrote before. And also please check generated SQL queries, probably you'll find the answer yourself. On Aug 22, 10:08 pm, graphicsxp wrote: > Hi, > > I'll post the relevant part o

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Tuna Toksoz
Caliburn? Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Sun, Aug 23, 2009 at 6:36 PM, Jim Tanner wrote: > > I am also interested in the subject. > Is there any MVP or MVVM open source framework

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Jim Tanner
I am also interested in the subject. Is there any MVP or MVVM open source framework that can handle winforms ? On 23 août, 15:36, Fabio Maulo wrote: > Belvasis, have you post an example some where ?If you want post your > examples in NH-Forge let me know. > Thanks. > > 2009/8/22 Belvasis > > >

[nhusers] Re: Work At Home - Earn $30,000 Per Month

2009-08-23 Thread Tuna Toksoz
Who let the dogs in? :) Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Sun, Aug 23, 2009 at 6:06 PM, Minisha Sharma wrote: > > Work At Home - Earn $30,000 Per Month > > > http://blogrns.googlepage

[nhusers] Work At Home - Earn $30,000 Per Month

2009-08-23 Thread Minisha Sharma
Work At Home - Earn $30,000 Per Month http://blogrns.googlepages.com/home --~--~-~--~~~---~--~~ 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

[nhusers] Re: Delete a child and the father gets deleted too ?

2009-08-23 Thread Fabio Maulo
Man, you are a eagle!! For me that mapping is unreadable. ;) 2009/8/22 Oskar Berggren > > 2009/8/22 Dimitris Andrakakis : > > > > Hi all, > > > > I have a problem which I find hard to understand : when I delete a > > child object, the father gets deleted too. > > > > The father is a class called

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
Belvasis, have you post an example some where ?If you want post your examples in NH-Forge let me know. Thanks. 2009/8/22 Belvasis > Hm, I think the first part of the blog describes the how and why of the > pattern well enough > > > http://fabiomaulo.blogspot.com/2008/12/conversation-per-business

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
That impl. allow what you are describing.A winForm, for use, should work using MVP. The P (or its variation VM for example) may work with its M or may share an M from a "parent" usecase. The M does not know if the persistence is implemented using NH or ADO.NET as the DAO/Repository impl. does not

[nhusers] Orphan delete in bidirectional one-to-many

2009-08-23 Thread Jason Dentler
I have a bidirectional one-to-many relationship with orphan delete. Since saying all orphan children should be deleted, it seems logical that the DB schema won’t allow orphaned children, meaning Child.Parent_id should have a NOT NULL constraint. However, when I add this constraint and try to do a

[nhusers] Re: Delete a child and the father gets deleted too ?

2009-08-23 Thread Dimitris Andrakakis
You're right... I have the cascade="all" attribute at the parent : But ofcourse it's not needed at the child... I removed it and it works fine. Thank you very much ! Dimitris Andrakakis On Aug 23, 1:20 am, Oskar Berggren wrote: > 2009/8/22 Dimitris Andrakakis : > > Hi all, > > > I have a p