[nhusers] Re: IsTransient and event listeners

2009-03-20 Thread mscheibler
Well, I think you are inheriting from EmptyInterceptor but instead of overriding you are in fact shadowing its methods. Try using overrides: public overrides bool OnLoad(object entity, ... Michael Scheibler On 19 Mrz., 21:20, epitka exptrade2...@yahoo.com wrote: Oh, it does not even

[nhusers] Re: SCOPE_IDENTITY() sometimes returns incorrect value

2009-03-20 Thread Tuna Toksoz
Here, I have written a post on this by more or less paraphrasing Fabio's post. http://nhforge.org/blogs/nhibernate/archive/2009/03/20/nhibernate-poid-generators-revealed.aspx Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com

[nhusers] Unique name and saving of entity

2009-03-20 Thread tvbusy
I'm working on an Windows Forms application. And entity is retrieved from database, passed to UI to let user edit and the save it back to database. I'm having a problem with the name unique constraint. It's like a file system when there should not be two file with the same name in the same

[nhusers] Re: Upgrade to 2.1.0.Alpha1 doesn't work with LinFu

2009-03-20 Thread nasedo47
Hi, I had to recompile NHibernate.dll (I didn't not recompile the ByteCodes). It seems to work but the recompiled version has a size of 1.720Ko and the one in the bin has a size of 1.736Ko (I don't know what's the cause of that difference). Another problem now is that

[nhusers] Re: Upgrade to 2.1.0.Alpha1 doesn't work with LinFu

2009-03-20 Thread Fabio Maulo
NHibernate.Caches.SysCache.SysCacheProvider is in NH-Contrib and it will be deployed in some moment after NH-Core final release.BTW you can try downloading the code of all cache and, if you have a problem, you can use the nh-contrib-dev-list. 2009/3/20 nasedo47 nased...@gmail.com Hi, I had

[nhusers] Re: Upgrade to 2.1.0.Alpha1 doesn't work with LinFu

2009-03-20 Thread Fabio Maulo
ah... I have compiled SysCacheProvider using NH2.1.0 without problems. 2009/3/20 Fabio Maulo fabioma...@gmail.com NHibernate.Caches.SysCache.SysCacheProvider is in NH-Contrib and it will be deployed in some moment after NH-Core final release.BTW you can try downloading the code of all cache

[nhusers] Re: Unique name and saving of entity

2009-03-20 Thread Germán Schuager
You should check that your DB constraints are not violated before trying to save your entity. In your case that means querying for an entity with the same name as the one that you are trying to save. On Fri, Mar 20, 2009 at 6:04 AM, tvbusy tvb...@gmail.com wrote: I'm working on an Windows

[nhusers] Re: Upgrade to 2.1.0.Alpha1 doesn't work with LinFu

2009-03-20 Thread nasedo47
Could you please tell me exactly where do I find those files? I am not really familiar with the NH-Contrib thing. Or maybe a link to download the new dll file? Thanks a lot On Mar 20, 11:43 am, Fabio Maulo fabioma...@gmail.com wrote: ah... I have compiled SysCacheProvider using NH2.1.0 without

[nhusers] NHBurrow works with NH 2.1.0 Alpha ?

2009-03-20 Thread Paulo Quicoli
Hi friends, it works with NH 2.1.0 Alpha ??? thanks -- Paulo R. Quicoli Editor Técnico - ClubeDelphi Magazine - DevMedia --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send

[nhusers] NHibernate.Util.WeakHashtable

2009-03-20 Thread JozefSevcik
Is it possible to make it [Serializable] ? Thanks --~--~-~--~~~---~--~~ 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 from this group, send

[nhusers] Re: Upgrade to 2.1.0.Alpha1 doesn't work with LinFu

2009-03-20 Thread nasedo47
Still have assembly error about versions 2.0.0.1001, 2.0.1.4000 of NHibernate.dll I think I have to go back to NHibernate 2.0 :-/ On Mar 20, 1:41 pm, Fabio Maulo fabioma...@gmail.com wrote: 2009/3/20 nasedo47 nased...@gmail.com Could you please tell me exactly where do I find those files?

[nhusers] Re: Upgrade to 2.1.0.Alpha1 doesn't work with LinFu

2009-03-20 Thread Gustavo Ringel
Every library you want to use with NH Alpha should be compiled with the Alpha of NH... There isn't so match science on this, but if you miss one of them you will get compiling errors because of the versions. In any case 2.0.0.1001...i think there never had been a version like this for NH :)

[nhusers] Re: NHibernate Lazy load and proxy object

2009-03-20 Thread Stefan Steinegger
Why can't you cast it because of the proxy? If the proxy would actually be derived from ProfileA, you should be able to cast it to ProfileA. Are you sure that you don't actually have a proxy of Profile? Check your mapping, did you define the subclasses and discriminators correctly? What is the

[nhusers] Re: NH2.1.0 Alpha1 is out

2009-03-20 Thread Stefan Steinegger
Fabio, I already downloaded the alpha version and tried it. There are some interface changes I have to fix, and DynamicProxy2 conflicts with the version for RhinoMocks. Nothing really serious so, but I still don't have the time to fix it this and next week. I just don't want to include alpha

[nhusers] Re: NH2.1.0 Alpha1 is out

2009-03-20 Thread Ayende Rahien
you can use the version of rhino mock that interalize dyn proxy On Fri, Mar 20, 2009 at 10:20 AM, Stefan Steinegger stefan@bluewin.chwrote: Fabio, I already downloaded the alpha version and tried it. There are some interface changes I have to fix, and DynamicProxy2 conflicts with the

[nhusers] Re: Lazy load and proxy object

2009-03-20 Thread rashack
Hi Roy, there's a way how to get around this although it involves having reference to your session...: ProfileB b = session.GetProfileB(user.Profile.Id); instead of doing your downcasting (which is not really OOP pure). It should not ivolve a database hit since the profile should already be

[nhusers] Re: NHBurrow works with NH 2.1.0 Alpha ?

2009-03-20 Thread Dario Quintana
Not yet On Fri, Mar 20, 2009 at 9:49 AM, Paulo Quicoli pauloquic...@gmail.comwrote: Hi friends, it works with NH 2.1.0 Alpha ??? thanks -- Paulo R. Quicoli Editor Técnico - ClubeDelphi Magazine - DevMedia -- Dario Quintana http://darioquintana.com.ar

[nhusers] Re: NH2.1.0 Alpha1 is out

2009-03-20 Thread Stefan Steinegger
I think I had problems with that, because classnames got ambiguous or something and that's why I've chosen the other. it's not a problem actually, I either recompile RhinoMocks or use LinFu. On 20 Mrz., 15:21, Ayende Rahien aye...@ayende.com wrote: you can use the version of rhino mock that

[nhusers] Unnecessary UPDATE generated by NH immediately after INSERT

2009-03-20 Thread epitka
I have some funky mapping going on here due to legacy db and code. Basically there is a composite Id that has a column that is also part of the component. NH creates update statement even though I specified that no update should be performed on the component, and no insert on one of the columns

[nhusers] Re: Unnecessary UPDATE generated by NH immediately after INSERT

2009-03-20 Thread Ayende Rahien
http://nhprof.com/Learn/Alert?name=SuperfluousManyToOneUpdate On Fri, Mar 20, 2009 at 11:35 AM, epitka exptrade2...@yahoo.com wrote: I have some funky mapping going on here due to legacy db and code. Basically there is a composite Id that has a column that is also part of the component. NH

[nhusers] Re: Unnecessary UPDATE generated by NH immediately after INSERT

2009-03-20 Thread epitka
Inverse is not valid on many-to-one tag and in the parent I do not have collection mapped at all. Here is the mapping for the parent, which is really not a parent, it is just an xref for codes. Maybe many-to-one is not appropriate for this? WithTable(AcctTypeRef);

[nhusers] Re: Why does a base class select all joined subclasses when all you want is the base?

2009-03-20 Thread kor
i have a similar problem wich i had resolved setting polymorphism=explicit in the mapping of the subclass, see if it's what you need --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups nhusers group. To post to this

[nhusers] IPostLoadEventListener and Child Object Collections

2009-03-20 Thread dhtroy
I have implemented IPostLoadEventListener and in this listener, for a specific parent object, I want to populate some data fields in that object, as well as some of the data in that parent's child collections. I have two issues that I need to resolve: #1 - when I access the child object

[nhusers] Re: NH2.1.0 Alpha1 is out

2009-03-20 Thread Danielg
I would love to migrate to the 2.1 release for testing. However I have modified the 2.0.1 GA to add some additional needed functionality, (Join to non primary keys) and so I'm stuck where I am. I submitted a feature request complete with tests and and a working patch for 2.1

[nhusers] Re: Why does a base class select all joined subclasses when all you want is the base?

2009-03-20 Thread BringerOD
Here is the complete example. I am new to Hibernate so if it’s obvious I apologize. I have show the example query that is performed the unit test, the class and the mapping. I am using fluent hibernate so I am not sure how to add polymorphism=explicit. Also I am using the Sharp Architecture.

[nhusers] Cascade saves don't update collection item ids

2009-03-20 Thread Shane C
We've run into a weird problem here. We have a RuleSet which contains Rules. In our mapping files RuleSets have a bag of Rules with cascade='all-delete-orphan' and inverse='true'. When we add a rule to a ruleset and save the ruleset the ID isn't getting set on the rule. Is this expected

[nhusers] Re: Cascade saves don't update collection item ids

2009-03-20 Thread Shane C
Tracked this down. The changes are not being flushed so the new ID isn't being retrieved till after our unit of work is completed. We tried changing FlushMode to Always but didn't see any difference in flushing behavior (The Session had already been used at this point so that may have something

[nhusers] Re: Cascade saves don't update collection item ids

2009-03-20 Thread Luke Bakken
I believe it is expected behavior if you're using identity as your POID generator, but I'm no expert. On Fri, Mar 20, 2009 at 12:20 PM, Shane C shanecourtri...@gmail.com wrote: Tracked this down.  The changes are not being flushed so the new ID isn't being retrieved till after our unit of

[nhusers] Re: Cascade saves don't update collection item ids

2009-03-20 Thread Shane C
That seems odd. I understand the problem but if my FlushMode is set to Auto, I would think NHibernate would be smart enough to realize that it needs to Flush to update the relevant Ids? Identity may not be the recommend practice but it's very common. On Mar 20, 1:40 pm, Luke Bakken

[nhusers] Re: NHibernate Lazy load and proxy object

2009-03-20 Thread kello
I have run into this problem when using single table inheritance and a table column as discriminator. At first I thought it was strange but then thinking about it further I realized that when lazy loading NH does not touch the database before creating the proxy object. Now how should NH know if

[nhusers] Re: NHibernate.Util.WeakHashtable

2009-03-20 Thread Fabio Maulo
why + in JIRA 2009/3/20 JozefSevcik sev...@styxys.com Is it possible to make it [Serializable] ? Thanks -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups nhusers group. To post to this group,

[nhusers] Re: Cascade saves don't update collection item ids

2009-03-20 Thread Fabio Maulo
inpractice you are looking for immediate access to DB for parent and all child right ? 2009/3/20 Shane C shanecourtri...@gmail.com That seems odd. I understand the problem but if my FlushMode is set to Auto, I would think NHibernate would be smart enough to realize that it needs to Flush to

[nhusers] Re: IPostLoadEventListener and Child Object Collections

2009-03-20 Thread Fabio Maulo
2009/3/20 dhtroy dht...@gmail.com I have implemented IPostLoadEventListener and in this listener, for a specific parent object, I want to populate some data fields in that object, as well as some of the data in that parent's child collections. I have two issues that I need to resolve: #1

[nhusers] Re: Cascade saves don't update collection item ids

2009-03-20 Thread Shane C
That's correct. That's how we thought it would work and we coded accordingly. Current fix is to just Flush on SaveOrUpdate. I can see the value of not using identity but it's way past the point where we could make that kind of change. On Mar 20, 3:18 pm, Fabio Maulo fabioma...@gmail.com

[nhusers] Re: NHibernate Lazy load and proxy object

2009-03-20 Thread Germán Schuager
I've worked out a similar situation using interfaces like this: interface IProfileA class ProfileA : IProfileA interface IProfileB class ProfileB : IProfileB interface IProfileProxy : IProfileA, IProfileB then specifying proxy=Namespace.IProfileProxy in the base class mapping and working

[nhusers] Re: Cascade saves don't update collection item ids

2009-03-20 Thread Fabio Maulo
Ok.You should do by yourself with an explicit Flush because NH is smart enough to limit RDBMS round-trips.If you like identity so much, you know that identity mean that the only way to know the ID is hitting DB. NH need the ID to add the reference to children so he must go to DB but he can delay

[nhusers] NHiberante and Auditing

2009-03-20 Thread Action Jackson
Does anyone have any good references or articles that I can take a look at to determine the best way to handle auditing for entities using NHibernate? Specifically, I would like to create one audit table per auditable object. All the examples I have seen thus far use one audit table for all

[nhusers] Re: NHiberante and Auditing

2009-03-20 Thread Fabio Maulo
Good point.If you want we can talk about some possibles implementations of auditing and then work to implements some general solution for each audit type. Here or in private, I like this matter and I'm thinking about an example and some classes to manage it. 2009/3/20 Action Jackson

[nhusers] Re: NHiberante and Auditing

2009-03-20 Thread Action Jackson
NHibernate In Action is an excellent book that gives great detail. However, the auditing implementation used in the book uses one audit table for all entities. I'm looking for an implentation that uses one audit table per entity. I am currently looking into the entity-name feature that has

[nhusers] Re: NHiberante and Auditing

2009-03-20 Thread Ayende Rahien
if I recall correctly. And extending that approach to have seperate audit table should be fairly simple. On Fri, Mar 20, 2009 at 7:22 PM, Action Jackson crjac...@gmail.com wrote: NHibernate In Action is an excellent book that gives great detail. However, the auditing implementation used in

[nhusers] Re: Logging Abstraction

2009-03-20 Thread Sidar Ok
Hi All, Nearly a week passed by, and here are the results : http://www.snappoll.com/view_results.php?poll_id=318184 *Logging Abstraction Poll for Nhibenate* Do you want to be able to override the logger in NH instead of having to use log4net? Yes 66% 31 No 34% 16 total votes: 47 On

[nhusers] Re: NHiberante and Auditing

2009-03-20 Thread Action Jackson
When I first looked into this, I figured it would be fairly simple. However, it doesn't seem to be trivial. Any suggestions or articles to point me in the right direction? On Mar 20, 6:26 pm, Ayende Rahien aye...@ayende.com wrote: if I recall correctly. And extending that approach to have

[nhusers] Re: NHibernate Lazy load and proxy object

2009-03-20 Thread kello
I don't see how an interface that derives from two other interfaces would help in doing different things depending on the type? For example if (Profile is ProfileA) DoA(); else if(Profile is ProfileB) DoB(); Or when using the Visitor pattern Am I missing something? /Jonas On Mar 20, 10:35 

[nhusers] Re: Logging Abstraction

2009-03-20 Thread Fabio Maulo
What mean each number in your opinion ? 2009/3/20 Sidar Ok sida...@gmail.com Hi All, Nearly a week passed by, and here are the results : http://www.snappoll.com/view_results.php?poll_id=318184 *Logging Abstraction Poll for Nhibenate* Do you want to be able to override the logger in NH

[nhusers] Re: Logging Abstraction

2009-03-20 Thread Sidar Ok
IMHO, The people who want logging abstraction is twice as much as people who don't want. 31 people who cares enough to vote and wanting this feature ain't that little. Admittedly, there is a good majority out there that who doesn't give a sh*t :) This might have several reasons though, varying

[nhusers] Re: Logging Abstraction

2009-03-20 Thread Fabio Maulo
My opinion is that is better to talk about something else.The NH-team can't considerer 47 votes as something serious to take a decision. We talk about logging abstraction in our dev-list and really is not a priority for us. Sure it is interesting and sure we will implement something for the next

[nhusers] Mapping Explicit Interface Properties with Same Name

2009-03-20 Thread jnoody
How do you map two properties with the same name from different interfaces? Ideally I would be able to map the interface properties in a table-per-subclass type scenario where there are two tables with a foreign key linking to the main entity table and a column in each subclass table for the

[nhusers] Named Queries do not work upgrading NH 1.2 to 2.0

2009-03-20 Thread Eric
Hi- We are investigating upgrading from NH 1.2 to 2.0. After fixing all of the namespace changes, I am getting an error with the named queries. In 1.2 they worked fine, now I get a runtime error with the following message: Errors in named queries: {IRI.GetAccounts} for all of the named