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

2009-08-24 Thread Stefan Nobis
Jim Tanner writes: > @Every one who might be interrested : This article deals with a way to > handle lazy loading in winforms. > http://www.codeproject.com/KB/cs/NHibernateLazyInitializer.aspx I don't think this is a good idea, because it may lead to quite bad performance. A much better approac

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

2009-08-22 Thread Stefan Nobis
ChrisHolmes writes: > I have yet to see anyone explain this clearly. Ok, I'll try to give at least some guideline. First of all: The most important thing to remember is that an ISession is really unstable and unreliable (according to the book 'Exceptional C++' of Herb Sutter ISession even break

[nhusers] Re: NHIbernate performance vs Entity Framework

2009-08-12 Thread Stefan Nobis
"F.B. ten Kate" writes: [session vs. stateless session] > Well wouldn't NHibernate be slow _every_ time i run this query then? Not necessarily. I don't know the exact overhead, but the default, stateful session uses caching mechanisms, so maybe filling the cache is slow. I would also suspect, a

[nhusers] Re: Denormalized Domain Model

2009-06-25 Thread Stefan Nobis
Fabio Maulo writes: [Attribute 'formula'] > Ah ok... There shouldn't work because it is pure SQL and NH only > touch it to add the root alias and nothing more. Are there any plans to support HQL to be used in 'formula' (or in a different attibute, let's call it 'hql-formula')? -- Until the nex

[nhusers] Re: Denormalized Domain Model

2009-06-25 Thread Stefan Nobis
mhanney writes: > regarding - "All users of Oracle have a default schema that is > different than the schema where the tables live so all objects have to > be fully qualified with the schema name", you could use public > synonyms in Oracle: > CREATE OR REPLACE PUBLIC SYNONYM TheTableName FOR > "T

[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread Stefan Nobis
Fabio Maulo writes: > the default_schema/default_catalog, of each mapping or of the > session-factory-configuration does not work ? It does not work for the SQL in the 'formula' attribute of a property (at least it didn't seem to work in 2.0.1GA last time I tried this). -- Until the next mail.

[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread Stefan Nobis
Tyler Burd writes: > Then you could have an NAnt target that would set up brail or some > other templating language, process the mapping files, and copy them > to a known directory. > Does that make sense? Thank you very much, that makes perfectly sense. I already utilise NAnt in other areas fo

[nhusers] Denormalized Domain Model

2009-06-23 Thread Stefan Nobis
Hi. My database schema has quite some references and in order to avoid loading always a great part of the wohle object graph I would like to get some of the often used detail data directly in the entity without denormalizing the schema. Two concrete examples: In the following mappings the class '

[nhusers] Re: Duplicates from criteria (slightly different case)

2009-01-28 Thread Stefan Nobis
"Will Shaver" writes: > Here's a snippet from my mapping: > > > > > > > > > > > > > > > > > > ... > > > > Hmmm... I also have to implement a temporal solution for (parts of) my domain entities. My problem is how to handle complete temporal graph hierachies. Thin

[nhusers] Re: How to sync changes between many clients?

2008-12-08 Thread Stefan Nobis
"Ayende Rahien" <[EMAIL PROTECTED]> writes: > you need to use a distributed cache for this Thank you very much (especially for the very fast answer). My thoughts went more in the direction of polling or message broker etc, I didn't thought of distributed caches. I will look into this. Thanks agai

[nhusers] How to sync changes between many clients?

2008-12-08 Thread Stefan Nobis
Hi. I'm looking for best practices to sync multiple clients. In my domain I have some bigger changes (for example generating many new lines in a couple of tables or changing a state (and a couple of other properties) for many lines). In another scenario (not that important for my current applicati

[nhusers] Re: How to initialise an object

2008-10-16 Thread Stefan Nobis
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > foreach (var businessUnit in standard.BusinessUnits) > NHibernateUtil.Initialize(businessUnit); BTW: just NHibernateUtil.Initialize(standard.BusinessUnits) should suffice (if your BusinessUnits don't contain other entities that have to be init

[nhusers] Re: How to initialise an object

2008-10-16 Thread Stefan Nobis
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > The problem is the call to NHibernateUtil.Initialize does not appear > to do anyting. Why do you think this? NHibernateUtil.Initialize works just fine (at least for me). After you initiliazation loop, try adding something like this: session.Dis

[nhusers] Re: Does NH really have Persistence Ignorance with POCOs? (Proxies question)

2008-10-07 Thread Stefan Nobis
MAMMON <[EMAIL PROTECTED]> writes: > So does NH really achieve Persistence Ignorance? IMNSHO it's a dumb idea to try to make your business layer completly persistence ingnorant (in the way you suggest), because there is some persistence in the background and you are developing a complex system. H

[nhusers] Re: Tables vs Views, using a for a class, and erroneous SQL generated for a many-to-one relationship

2008-10-03 Thread Stefan Nobis
MAMMON <[EMAIL PROTECTED]> writes: > The problem with views like this is that they are read only. Why? Do you know about triggers? That's the easiest and most straightforward solution, I would think. -- Until the next mail..., Stefan. pgpa9RNXw7jwM.pgp Description: PGP signature

[nhusers] Re: Restrictions.NotEqProperty and NULLs does not work as expected

2008-10-03 Thread Stefan Nobis
Tapio Kulmala <[EMAIL PROTECTED]> writes: > You said that foo = null is always false Yes, he said that, but he didn't mean it. :) This whole thread is another example of why it's a big design fault to ever include NULL into SQL. Three valued logic is just not for everyone. As the cited link sai

[nhusers] Re: Discriminator bug

2008-09-28 Thread Stefan Nobis
"Jon Palmer" <[EMAIL PROTECTED]> writes: > As I described in an earlier email, it's entirely right, indeed > preferable, that NHibernate does not add the where clause when you > query for the base class (as is always the case if there is only one > class). It depends on your viewpoint. You are ri

[nhusers] Re: NHibernate relations

2008-09-21 Thread Stefan Nobis
"Ricardo Borges" <[EMAIL PROTECTED]> writes: > "Common Lisp is a multiparadigm, general-purpose programming > language that: Supports a combination of procedural, functional and > object-oriented programming paradigms." > The question is not about the best paradigm to develop a solution. The > id

[nhusers] Re: NHibernate relations

2008-09-21 Thread Stefan Nobis
ndotan <[EMAIL PROTECTED]> writes: > I have a theoretical question.i fail to see how nhibernate makes > life easy for me by mapping relations. I don't like the mainstream and I'm not really convinced that ORMs are a good idea, so maybe I can add a little different perspective. First of all: OO i

[nhusers] Re: Schema Export and default data

2008-09-16 Thread Stefan Nobis
"Fabio Maulo" <[EMAIL PROTECTED]> writes: > Perhaps I don't understand Perhaps I misread to documentation... > allow the node to specify for which > dialects (more than one) the can be exported. Oh... then a very hasty test I did quite some time ago must been faulty (I don't remember th

[nhusers] Re: Schema Export and default data

2008-09-16 Thread Stefan Nobis
"Fabio Maulo" <[EMAIL PROTECTED]> writes: > 2008/9/16 Stefan Nobis <[EMAIL PROTECTED]> >> 2. Manual additions (DEFAULTs, triggers,...) >> I plan to write a tool to generate all (except 2.) > 2 is part of 1a () Nah, NHibernate doesn't support an ea