[nhusers] NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread FrederikGheysels
Hi, I'm migrating my application from NHibernate 2.0 to NHibernate 2.1 (beta) (There are some features in it, and I want to use them already etc... ). Now, everything works fine: the application compiles, it runs , etc... However, I have unit-tests that fail, and those failing tests, all fail

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread Tuna Toksoz
Can you create a test case? with mappings, and code? Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Thu, Jun 25, 2009 at 12:33 PM, FrederikGheysels frederik.gheys...@pandora.be wrote: Hi,

[nhusers] Any and child collections

2009-06-25 Thread Fethi Gürcan
Hello, I have a sample map for testing any below. *Sample Scenario:* There are Office and Home Entities. And Phone Entity that parent as Office or Home with any mapping. It is good but i don't know how i can add a IListPhone property to Home and Office classes that gets the own phone records??

[nhusers] Re: TransientObjectException with legacy mapping

2009-06-25 Thread Jeffrey Cameron
Sonofagun ... that was it! Thank you very much, you just saved me a few days of headscratching! On Wed, Jun 24, 2009 at 10:33 PM, Dario Quintana conta...@darioquintana.com.ar wrote: You are creating your schema into the database with STC.EI.Data.SessionManager.BuildSchema() but the problem

[nhusers] Re: TransientObjectException with legacy mapping

2009-06-25 Thread Jeffrey Cameron
errr ... scratch that. Sorry, I am trying an experimental Fluent Nhibernate project with the same set of data but without the string-based keys (to get rid of the funky mappings) and I ran my test in there. This is what I get for trying out something at 6am :-) When I drop all of the tables in

[nhusers] Re: v2.1.0 beta 2 bug under mono 2.4

2009-06-25 Thread Luca Del Tongo
I'm facing the same problem as Bryan stated, with the same configuration. Any ideas? On Jun 23, 12:50 am, Bryan Murphy bmurphy1...@gmail.com wrote: Hey guys, I'm running into the a problem compiling our hbm files under Mono v2.4 and NHibernate v2.1.0 beta 2.  Looking through the code, it

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread FrederikGheysels
Ok, I've created one, it can be found here: http://users.pandora.be/fgzone/testcase.zip On 25 jun, 11:57, Tuna Toksoz tehl...@gmail.com wrote: Can you create a test case? with mappings, and code? Tuna Toksöz Eternal sunshine of the open source mind.

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread Tuna Toksoz
The file is corrupt. Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Thu, Jun 25, 2009 at 2:05 PM, FrederikGheysels frederik.gheys...@pandora.be wrote: Ok, I've created one, it can be found

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread FrederikGheysels
I've placed a new file here: http://users.pandora.be/fgzone/testcase.rar On 25 jun, 13:17, Tuna Toksoz tehl...@gmail.com wrote: The file is corrupt. Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread Tuna Toksoz
Alright, figured out the problem... int result = session.Delete (from Person p where p.Code=?, ABC, NHibernateUtil.String); It uses un-named parameters... Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com

[nhusers] Re: Mapping to a Table Value Function (TVF)

2009-06-25 Thread John Rayner
We use something like this: public IListContactHistoryEvent GetMyEntities(int argument) { IQuery query = _session.GetNamedQuery(queryName); query.SetParameter(0, argument); return query.ListContactHistoryEvent(); } Cheers, John On Jun 25, 11:39 am, JamesSpibey

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread FrederikGheysels
So, if I understand this well, it is a little bug in NHibernate ? How can I solve it (temporarily) in my code ? By using non-named parameters ? On 25 jun, 14:00, Tuna Toksoz tehl...@gmail.com wrote: Alright, figured out the problem...                 int result = session.Delete (from Person p

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread Tuna Toksoz
Well, I don't know if this is a bug or by design as the current Delete method doesn't offer any named stuff (the method signature doesn't have it). I am going to ask you to create a bug report in JIRA http://jira.nhforge.org. In case this is not a bug, we'll close it. In case it is a bug, we'll

[nhusers] Re: Denormalized Domain Model

2009-06-25 Thread Stefan Nobis
mhanney mrh5...@gmail.com 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

[nhusers] Re: NH2.1 beta: Delete HQL query throws NullReferenceException

2009-06-25 Thread FrederikGheysels
Done: http://nhjira.koah.net/browse/NH-1854 On 25 jun, 14:16, Tuna Toksoz tehl...@gmail.com wrote: Well, I don't know if this is a bug or by design as the current Delete method doesn't offer any named stuff (the method signature doesn't have it). I am going to ask you to create a bug report

[nhusers] Re: Any and child collections

2009-06-25 Thread Tuna Toksoz
With bag and where clause in the mapping, is my guess. Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike 2009/6/25 Fethi Gürcan fethigur...@gmail.com Hello, I have a sample map for testing any below.

[nhusers] Re: Any and child collections

2009-06-25 Thread Fabio Maulo
Home and Office has a common root entity, may be Address. 2009/6/25 Fethi Gürcan fethigur...@gmail.com Hello, I have a sample map for testing any below. *Sample Scenario:* There are Office and Home Entities. And Phone Entity that parent as Office or Home with any mapping. It is good but i

[nhusers] loader query-ref

2009-06-25 Thread dyahav
Hi, I'm trying to use the loader query-ref for a collection like the following: set name=Families inverse=true key/ one-to-many class=FamilyUnit / loader query-ref=LoadItems / /set . sql-query name=LoadItems load-collection alias=fam

[nhusers] Re: key-many-to-one and eager fetching

2009-06-25 Thread webpaul
I have run into this problem as well when using anything other than a single primary key. I ended up just adding an identity column and using that as the key for the tables I had this problem with so if there is another solution I'd love to hear it. On Jun 24, 2:06 pm, jods joel.du...@gmail.com

[nhusers] Re: Generated HILO Property

2009-06-25 Thread Mike Nichols
Thanks Fabio I went and implemented a trigger for the incrementing _column_ (which is a property in the object). BTW, there is an example in the tests for a component that does precisely that and was handy to get me started. If this isn't good enough I'll look deeper into configuring an

[nhusers] Re: ProxyWarnLog

2009-06-25 Thread Tuna Toksoz
You have a reference to a base class, but when loaded, it becomes the super class, it is narrowed. Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Thu, Jun 25, 2009 at 10:24 PM, Jan Limpens

[nhusers] Re: ProxyWarnLog

2009-06-25 Thread Fabio Maulo
/// summary /// If the existing proxy is insufficiently narrow (derived), instantiate a new proxy /// and overwrite the registration of the old one. This breaks == and occurs only for /// class proxies rather than interface proxies. Also init the proxy to point to /// the given target

[nhusers] Re: deep copy aggregate root

2009-06-25 Thread Luke Bakken
2009/6/20 Yevhen Bobrov yevhen.bob...@gmail.com: This is very poor performance. You can have 3 db hits per such simple stuff. Imagine that you have a Customers grid. And user starts editing current cell - 1 load. Lag. Than it can discard edit. Not bad - nothing will happen. Or he could

[nhusers] Re: Session Management Issues

2009-06-25 Thread joshlrogers
Fabio, I am running into a very strange problem. I have gotten the CpBT to work successfully in unit tests. However when I added CpBT to the main code base it now won't work even though the UnitTests are using the exact same ServiceLocatorProvider configuration and they are in the same

[nhusers] HiLo: Using UserType as

2009-06-25 Thread David Henry
Hello, I am looking into replacing our id columns that are currently MSSQL identity to HiLo generated values to support UoW. To support some legacy data associations, we have the concept that 0 means null for the association mappings - so we have a UserType that uses 0 as a null identifier for

[nhusers] Re: Session Management Issues

2009-06-25 Thread Fabio Maulo
Josh where we should continue this ?Here ? in uNhAddInsList ? in private ? I'm a bit confused. Btw the problem, may be, is only the order of the IoC component registration. The static class of the example is only for that Console application example. 2009/6/25 joshlrogers joshlrog...@gmail.com

[nhusers] Re: Session Management Issues

2009-06-25 Thread Josh Rogers
I apologize, let us continue it in uNHAddins since we have the most information there already: Here is a link for anyone following this: http://groups.google.com/group/unhaddins/t/5a9dcffa5110358e Thanks, Josh On Thu, Jun 25, 2009 at 3:44 PM, Fabio Maulo fabioma...@gmail.com wrote: Josh where

[nhusers] Re: HiLo: Using UserType as

2009-06-25 Thread David Henry
Sorry, I'll try to clarify. My mapping is defined similar to: id name=ID type=Foo.UserTypes.IntZeroAsNullIdentifier, foo generator class=hilo/ /id When running a test, there is an error similar to type is not a ValueTypeType. This seems to be because

[nhusers] Re: HiLo: Using UserType as

2009-06-25 Thread Fabio Maulo
The default hilo generator is implemented to work with a NH's PrimitiveType.Remove this limitation, in NH, is *not* a big work even if I don't think it can solve your problem because the minimal required interface should be IType... so, in your case, we are returning in the same place. I have a

[nhusers] Re: Handling Validator InvalidStateException within a Unit Of Work

2009-06-25 Thread Gary Brunton
It appears that clearing the session if a validation error is found does not guarantee that the invalid entity is not persisted. So I'm guessing that the only way to not persist an entity that was hydrated from a repository and made invalid within some business/service layer is to make sure the

[nhusers] Many-to-Many with a Join on one side using the look up table?

2009-06-25 Thread Dave
Hi, I have a DB like this [Address] - [Person_Address]-- [Person] | [Address_Type] I want my Person class to have a Bag of Addresses but would like to have the Addree_Type.Name field as a String