Re: [nhusers] Re: Problem with Batching + HiLo

2009-11-24 Thread Oskar Berggren
I've now managed to find some hint of documentation on Fluent NHibernate's HiLo-generator. It calls this parameter maxLo, and the meaning should be the same as for XML-mapping: http://nhforge.org/doc/nh/en/index.html#mapping-declaration-id-hilo What it means can be described as the number of ids

[nhusers] Re: Filter child collection with NHibernate.Linq provider

2009-11-24 Thread makka Claudio Maccari/
Version 1.0.0.0 On Nov 23, 10:58 pm, Steve Strong srstr...@gmail.com wrote: What version of NH and Linq provider are you using? Steve Strong Twitter Blog NHibernate Professional Support On 23 Nov 2009, at 18:31, makka wrote: I'm using NHibernate.Linq and this query works like a

[nhusers] Re: Filter child collection with NHibernate.Linq provider

2009-11-24 Thread makka Claudio Maccari/
And NH vers. 2.1.0.1001 On Nov 23, 10:58 pm, Steve Strong srstr...@gmail.com wrote: What version of NH and Linq provider are you using? Steve Strong Twitter Blog NHibernate Professional Support On 23 Nov 2009, at 18:31, makka wrote: I'm using NHibernate.Linq and this query works

[nhusers] Re: SetLockMode with IQuery and SQL Server

2009-11-24 Thread Graham Bunce
/bump . or any links to SetLockMode with a Query and what the alias means? Google doesn't come up with much for Querys. There's quite a lot for Criterion... does SetLockMode not actually work for a query? The documentation says its IQuery.SetLockMode() whereas it is actually

[nhusers] Re: Problem with Batching + HiLo

2009-11-24 Thread Tazer
Thanks alot Oskar! Works like a charm. I had misunderstood that method On 24 Nov, 10:25, Oskar Berggren oskar.bergg...@gmail.com wrote: I've now managed to find some hint of documentation on Fluent NHibernate's HiLo-generator. It calls this parameter maxLo, and the meaning should be the same

[nhusers] How do I automatically deploy my proxy DLL (Castle) when running unit tests?

2009-11-24 Thread JamesSpibey
Hi, Is there a setting in VS2008 where I can tell it to copy the Castle Proxy dlls to the output dir when running MSTests or even just compiling my web app? I often find that I have to manually copy these Dlls around to get the app to run Thanks James -- You received this message because you

RE: [nhusers] How do I automatically deploy my proxy DLL (Castle) when running unit tests?

2009-11-24 Thread Roger Kratz
Project - properties - build events Use (x)copy or similar. -Original Message- From: JamesSpibey [mailto:james.spi...@gmail.com] Sent: den 24 november 2009 11:01 To: nhusers Subject: [nhusers] How do I automatically deploy my proxy DLL (Castle) when running unit tests? Hi, Is there

[nhusers] PropertyAccessException while Upgrading from NH1.2 to NH2.1

2009-11-24 Thread NikolaSubic1664
Hi all, while upgrading my Application from NHibernate 1.2 / Spring.Net to NHibernate 2.1 / Spring.Net 1.3 I´m getting a Exception: NHibernate.PropertyAccessException: Invalid Cast (check your mapping for property type mismatches); setter of PersistenceLayer.Entities.Masterdata.MasterdataObject

[nhusers] Re: How do I automatically deploy my proxy DLL (Castle) when running unit tests?

2009-11-24 Thread NikolaSubic1664
Hi, did you set the Property Local Copy of the Referenced DLL to true ? -- You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send email to nhus...@googlegroups.com. To unsubscribe from this group, send email to

[nhusers] Problem with NHibernate Validator

2009-11-24 Thread Jamie Penney
Hi All, I am having an issue getting a basic example of Nhibernate Validator working using version 1.2.0 beta 3. I have a very basic NHibernate project, with an Entity called Category: public class Category { public virtual int CategoryID { get; set; }

[nhusers] Complex Mapping Issue Using A Component For A One To Many

2009-11-24 Thread Alex Robson
Pardon my noobishness as I may often use the wrong terminology in trying to describe my issue but several hours of searching is leaving me empty-handed. I am using NHibernate with Fluent NHibernate for mapping. In my database I have a one to many relationship. I always see this represented in a

[nhusers] Re: How do I automatically deploy my proxy DLL (Castle) when running unit tests?

2009-11-24 Thread NikolaSubic1664
there is a Property Local Copy in the Properties of the Referenced dll, set it to true This works in my Applications Greetings Milan -- You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send email to nhus...@googlegroups.com. To

[nhusers] PropertyAccessException while upgrading from NH1.2 to NH2.1

2009-11-24 Thread NikolaSubic1664
Hi all, we´re facing a problem while upgrading NHibernate from 1.2 to 2.1, a mapping that was accepted in 1.2 throws now a exception: NHibernate.PropertyAccessException wurde nicht von Benutzercode behandelt. Message=Invalid Cast (check your mapping for property type mismatches); setter of

[nhusers] Saving One-To-Many relationships

2009-11-24 Thread eigeneachse
h...@all, i have the following configuration. ClassA{ IListClassB MyList... ... } ClassB{ ClassA referenceToParent } And my hibernateconfig is as follows. ClassA bag name=ClassB lazy=true cascade=all inverse=true cache region=10Minutes

Re: [nhusers] Problem with NHibernate Validator

2009-11-24 Thread Fabio Maulo
Jaime, can you read this serie ? http://fabiomaulo.blogspot.com/search/label/Validator http://fabiomaulo.blogspot.com/search/label/ValidatorYou are using an empty configuration. btw if you remove this _validator.Configure(new NHVConfigurationBase()); all should work. anyway have a look to the

Re: [nhusers] Re: Filter child collection with NHibernate.Linq provider

2009-11-24 Thread Fabio Maulo
1001 mean: some revision of the trunk of NH2.1.0 2009/11/24 makka Claudio Maccari/ claudio.macc...@gmail.com And NH vers. 2.1.0.1001 On Nov 23, 10:58 pm, Steve Strong srstr...@gmail.com wrote: What version of NH and Linq provider are you using? Steve Strong Twitter Blog

Re: [nhusers] Saving One-To-Many relationships

2009-11-24 Thread Diego Mijelshon
Your mapping is correct. You have to explicitly set the in-memory object relationships in both directions. The usual way to do this is add a method to ClassA: public void AddB(ClassB b) { MyList.Add(b); b.referenceToParent = this; } If you are directly assigning a ListClassB to MyList,

[nhusers] Re: Saving One-To-Many relationships

2009-11-24 Thread eigeneachse
Hi Diego, this did work for me. Thank you a lot. Regards eigeneachse On Nov 24, 12:53 pm, Diego Mijelshon di...@mijelshon.com.ar wrote: Your mapping is correct. You have to explicitly set the in-memory object relationships in both directions. The usual way to do this is add a method to

[nhusers] Re: LinFu and Spring specific DynProxyTypeValidator subclass.

2009-11-24 Thread Nik Govorov
you should explain me how NH should understand how use your ctor with parameter and how we can create a Proxy of your class. If there is no default ctor and we do not need use IOC, as the last (slow) alternative we can use FormatterServices.GetUninitializedObject (type). Can you send an

[nhusers] how to instantiate an ISet ?

2009-11-24 Thread graphicsxp
Hi, One of my mapped classes has an ISet collection. When I create a new instance of that class, I can't add any elements to the the collection because it's null. However the compiler doesn't let me instantiate the collection. How can I do that ? Thanks -- You received this message because you

Re: [nhusers] how to instantiate an ISet ?

2009-11-24 Thread Germán Schuager
private ISet items = new HashedSet() ? On Tue, Nov 24, 2009 at 10:37 AM, graphicsxp graphic...@googlemail.comwrote: Hi, One of my mapped classes has an ISet collection. When I create a new instance of that class, I can't add any elements to the the collection because it's null. However

[nhusers] Re: how to instantiate an ISet ?

2009-11-24 Thread graphicsxp
Thanks !! I was doing : items = new Set(); On 24 nov, 14:40, Germán Schuager gschua...@gmail.com wrote: private ISet items = new HashedSet()   ? On Tue, Nov 24, 2009 at 10:37 AM, graphicsxp graphic...@googlemail.comwrote: Hi, One of my mapped classes has an ISet collection. When I

[nhusers] joined-subclass persitence

2009-11-24 Thread Dan
Within our system we have the concept of an employee. It contains your basic employee data such as name, address, etc. We are in the process of building a new application that needs this core employee data but also needs to track information about a driver. Because a driver has the same

Re: [nhusers] joined-subclass persitence

2009-11-24 Thread Germán Schuager
I think that a one-to-one mapping with cascade=save-update might work. http://nhforge.org/doc/nh/en/index.html#mapping-declaration-onetoone On Tue, Nov 24, 2009 at 12:11 PM, Dan dnorm...@yahoo.com wrote: Within our system we have the concept of an employee. It contains your basic employee

Re: [nhusers] joined-subclass persitence

2009-11-24 Thread Dan Normington
Germán, thanks for the advice. I ran into that solution when I first started the design but I was hoping I could take a more object oriented approach. Based upon my results it looks like using a one-to-one is probably going to be the way I'll have to go. Thanks again

[nhusers] DML-style operations

2009-11-24 Thread dyahav
Hi, Using NH 2.1, I'm trying to execute HQL update operation as follows: session.CreateQuery(Update Address add set add.City= 'f', add.Street = 'df' where ID=4); The sql translator ignores from the second set -- add.Street = 'df' such that the generated sql looks like: UPDATE Address SET

[nhusers] it's possible to use dbdataadapter with nhibernate or reference the dbtransaction?

2009-11-24 Thread kor
hi all, i'm using nhibernate with firebird as database. i'm using the transaction-per-request pattern. in a place of my application i 'm using the DbDataAdapter ado.net object. my code is samething as DbProviderFactory m_Provider = ***; DataTable myTable = ***; using (DbDataAdapter adapter =

[nhusers] Collection was not processed by flush()

2009-11-24 Thread epitka
Hi, I am getting this error when saving entity. This problem pops up only when I have a PreUpdateEventListener registered with session factory. In this event listener, I need to navigate the object graph, and it may or may not lazy load collections in the parent. I am doing some serialization of

[nhusers] Re: Problem with NHibernate Validator

2009-11-24 Thread J Penney
Turns out this wasn't the issue at all. I had an issue with my solution file which meant it wasn't building my NHibernate project, so the attributes I had just added to that class were not being compiled in. I've been reading that series of yours, it is full of useful information. Cheers, Jamie

Re: [nhusers] Re: Problem with NHibernate Validator

2009-11-24 Thread Fabio Maulo
btw don't use the empty configuration. instead use the default Xml conf or Loquacious (the fluent conf); in practice the usage of _validator.Configure(new NHVConfigurationBase()) and use only _validator is the same and can work only with attributes. The empty conf has some defaults and is