[nhusers] Re: Found shared references to a collection

2008-10-23 Thread Will Shaver
Death to foo and bar! http://www.primedigit.com/2008/08/05/death-to-foo-and-bar ;-) On Thu, Oct 23, 2008 at 4:00 PM, Jan Limpens <[EMAIL PROTECTED]> wrote: > > That's the problem with foobar code. It tends to oversimplify code (I > tend to :)) > Categories is virtual in Article and overridden i

[nhusers] Re: Found shared references to a collection

2008-10-23 Thread Jan Limpens
That's the problem with foobar code. It tends to oversimplify code (I tend to :)) Categories is virtual in Article and overridden in SubArticle. Still I get this error. I will post original code tomorrow. On Thu, Oct 23, 2008 at 6:26 PM, Jon Palmer <[EMAIL PROTECTED]> wrote: > You should really h

[nhusers] Re: Lazy Loading but from a different place

2008-10-23 Thread Tim Barcz
Please explain On Thu, Oct 23, 2008 at 3:25 PM, Fabio Maulo <[EMAIL PROTECTED]> wrote: > In NH2.0 implementation of IInitializeCollectionEventListenerBTW, IMO, > an appropriate method would be better for various reasons. > > 2008/10/23 Jason Meckley <[EMAIL PROTECTED]> > > >> you could implem

[nhusers] Re: Found shared references to a collection

2008-10-23 Thread Jon Palmer
You should really have a new keyword on the definition of the Categories in Bar or declare Categories as virtual in Foo and override in Bar. Not sure if NHibernate deals with the first case but if defintiely handles the second. -Original Message- From: nhusers@googlegroups.com [mailto:[E

[nhusers] Re: Lazy Loading but from a different place

2008-10-23 Thread Fabio Maulo
In NH2.0 implementation of IInitializeCollectionEventListenerBTW, IMO, an appropriate method would be better for various reasons. 2008/10/23 Jason Meckley <[EMAIL PROTECTED]> > > you could implement an IUserType to load the data from the products > db. I used this technique twice. > once to use N

[nhusers] Re: Lazy Loading but from a different place

2008-10-23 Thread Jason Meckley
you could implement an IUserType to load the data from the products db. I used this technique twice. once to use NullObjects in my domain to avoid if(foo != nul) checks. the second time was to pull data from ActiveDirectory based on account name (stored in the primary db). On Oct 23, 2:58 pm, "T

[nhusers] Re: Lazy Loading but from a different place

2008-10-23 Thread Will Shaver
Do you need to update the OrderItems? If not, you could use a view. I've used this successfully to merge a database I could write to with one I could not. You can map hbm files to views, just specify the view name as the "table". On Thu, Oct 23, 2008 at 11:41 AM, Tim Barcz <[EMAIL PROTECTED]>

[nhusers] Re: Found shared references to a collection

2008-10-23 Thread Jan Limpens
Bar is ... I have Product:Article and SubArticle:Article (among others). SubArticles are Products that override (datawise) some properties, like Name, Weight, Price (a SubArticle is essentially the Product in a different quantity. If the Product comes in 50 units, there might be a SubArticle that

[nhusers] Re: Lazy Loading but from a different place

2008-10-23 Thread Tim Barcz
Willwe don't have product information in the database at all, it's stored in another database (not SQL). On Thu, Oct 23, 2008 at 1:49 PM, Will Shaver <[EMAIL PROTECTED]> wrote: > > Do you need to update the OrderItems? If not, you could use a view. > I've used this successfully to merge a dat

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread Ayende Rahien
Hell, NH has the same license as Hib. And Hib is used in pretty significant parts of the Java space. On Thu, Oct 23, 2008 at 8:24 PM, James Kovacs <[EMAIL PROTECTED]>wrote: > Most of my clients are enterprise and use NHibernate in internal apps, but > I do have one client who is a very well-known

[nhusers] Re: Found shared references to a collection

2008-10-23 Thread Jon Palmer
Why do you have Bar subclass Foo and also compose a Foo in the parent field? -Original Message- From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jan Limpens Sent: Thursday, October 23, 2008 11:39 AM To: nhusers@googlegroups.com Subject: [nhusers] Found shared refere

[nhusers] Lazy Loading but from a different place

2008-10-23 Thread Tim Barcz
We have two databases, a SQL server database and another proprietary database for storing our products in. We want to store order information in the database. In the object world, the Order has OrderItems. OrderItem is composed of a Product and a Quantity. The problem is the Product information

[nhusers] Found shared references to a collection

2008-10-23 Thread Jan Limpens
hi guys, i have a class Foo { IList Categories { get; set; } } and class Bar : Foo { public Bar(Foo parent) { this.parent = parent; } IList Categories { get {return parent.Categories;} set {parent.Categories = value; } } } when I try to hibernate this, I get a HibernateEx

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread James Kovacs
Most of my clients are enterprise and use NHibernate in internal apps, but I do have one client who is a very well-known ISV - I can guarantee that you'd recognize the name if I could tell you - that is using NHibernate in its commercial products. I'm sure that the company's legal department would

[nhusers] Re: Can composite elements have read only properties

2008-10-23 Thread Keith Bloom
Hi Sean, Thanks but I tried that and NH attempted to insert in to the column. It may very well be that a composite element shouldn't be read only. Keith. On 22 Oct, 16:31, "Sean Carpenter" <[EMAIL PROTECTED]> wrote: > To have it populated from the DB but not persisted, you should be able to > s

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread Fabio Maulo
2008/10/23 Ayende Rahien <[EMAIL PROTECTED]> > you can, there are nothing in NH that force you to do anything > Fantastic one-line-summary ! -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers"

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread Ayende Rahien
you can, there are nothing in NH that force you to do anything On Thu, Oct 23, 2008 at 1:10 PM, N. D. <[EMAIL PROTECTED]> wrote: > im not sure i explained myself correctly, i was not referring to what > happens if i change NHibernate. > I'm referring to a real world situation, where for a commerc

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread Sidar Ok
You won't have any problem on your way in this mannerm with any LGPL On Thu, Oct 23, 2008 at 1:10 PM, N. D. <[EMAIL PROTECTED]> wrote: > im not sure i explained myself correctly, i was not referring to what > happens if i change NHibernate. > I'm referring to a real world situation, where for a c

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread Ken Egozi
then you're on 1 just put the license in as text file nd you should be done with it On Thu, Oct 23, 2008 at 1:10 PM, N. D. <[EMAIL PROTECTED]> wrote: > im not sure i explained myself correctly, i was not referring to what > happens if i change NHibernate. > I'm referring to a real world situation

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread N . D .
im not sure i explained myself correctly, i was not referring to what happens if i change NHibernate. I'm referring to a real world situation, where for a commercial application i want to use NHibernate as an ORM. But not have any license enforced against my commercial product. On Thu, Oct 23, 20

[nhusers] Entity replication

2008-10-23 Thread Daniel Ferreira Monteiro Alves
Hi guys, How is the best way to copy an entity from one Session to another (database to database). There is a replicate method on the session, but I don't know if the way is using this method or just evict + save into the second session. -- Daniel Ferreira Monteiro Alves --~--~-~--~-

[nhusers] Re: regarding nhibernate license

2008-10-23 Thread Ken Egozi
afaik LGPL mean: 1. you can link to and redistribute *binaries*, using whichever license for your part of the code, as long as you a. create something that adds a significant thing to the library (so you can sell MyCoolOrm which delegates to NH) b. attach the license file next to NH dll 2.

[nhusers] regarding nhibernate license

2008-10-23 Thread N . D .
i understand that the license is LGPL. to verify: it means that practically for commercial applications they can link the DLL and remain propietary (what does the note about reverse engineering the commercial app mean?) ? thanks --~--~-~--~~~---~--~~ You received t

[nhusers] Re: NHibernate Counter Cache?

2008-10-23 Thread Thomas Koch
Why not use a computed property on the Post: I have used this in a similar scenario with a web application, and it worked very well. The catch is that you have SQL in the mapping file, which will make them less portable to another database, but unless the system needs to switch database, I wou

[nhusers] Re: NHibernate Counter Cache?

2008-10-23 Thread Thomas Koch
Why not use a computed property on the Post: I have used this in a similar scenario with a web application, and it worked very well. The catch is that you have SQL in the mapping file, which will make them less portable to another database, but unless the system needs to switch database, I wou

[nhusers] Re: NHibernate Counter Cache?

2008-10-23 Thread Thomas Koch
Why not use a computed property on the Post: I have used this in a similar scenario with a web application, and it worked very well. The catch is that you have SQL in the mapping file, which will make them less portable to another database, but unless the system needs to switch database, I wou