[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread Stefan Nobis
Tyler Burd tb...@cudc.org 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

[nhusers] Re: calling an oracle stored procedure from nhibernate

2009-06-24 Thread Davy Brion
and don't forget to enlist the IDbCommand in the session's current Transaction before you execute it On Tue, Jun 23, 2009 at 4:41 AM, Plácido Bisneto placido.dine...@gmail.comwrote: you can use the ADO.NET connection in this particular case and then create a IDbCommand, fill the IDbParameters

[nhusers] Re: Session Management Issues

2009-06-24 Thread joshlrogers
Ok, you confirmed something I was thinking but was not sure of in regards to the session per call. So then how do you suggest setting the boundaries of a session in a win-forms app? Obviously not the entire application as you said that is a time-bomb and from the little I understand I agree.

[nhusers] Re: Session Management Issues

2009-06-24 Thread Fabio Maulo
well... what I suggest is CpBT because, so far, it is working very well.What I'm seeing is that many winForm/wpf developers are scared by IoC/AOP (that shouldn't be your case if in some moment you was thinking about PostSharp). Perhaps I should find the time to implements a manual management of

[nhusers] Re: Session Management Issues

2009-06-24 Thread Josh Rogers
Fabio, I am not scared of IoC/AOP (well the MSIL code scared me for the AOP) but I fully admit I don't understand it. I am trying but I am beginning to wonder if I am just not able to grasp the concepts. My struction is this: winForm - Logic Layer - DAL - NH - DB I am sure the CpBT would work

[nhusers] Re: Session Management Issues

2009-06-24 Thread Fabio Maulo
2009/6/24 Josh Rogers joshlrog...@gmail.com My struction is this: winForm - Logic Layer - DAL - NH - DB I am sure the CpBT would work perfectly for me, I have no doubt that you know exactly what your talking about, the problem is I can't understand when or how to use it. Well... that is

[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread Tyler Burd
There may be an easier way. I just came across this tidbit of sql that can be used to change the user's current schema: alter session set current_schema= your_oracle_schema You could issues that command right after you open each session for your oracle implementation. You will probably have

[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread Fabio Maulo
the default_schema/default_catalog, of each mapping or of the session-factory-configuration does not work ? 2009/6/24 Tyler Burd tb...@cudc.org There may be an easier way. I just came across this tidbit of sql that can be used to change the user's current schema: alter session set

[nhusers] Re: Multi language implementation

2009-06-24 Thread Michal Gabrukiewicz
here is a detailed description of how i did solved the multi language problem: http://www.webdevbros.net/2009/06/24/create-a-multi-languaged-domain-model-with-nhibernate-and-c/ On 15 Apr., 14:42, Michal mga...@gmail.com wrote: On Apr 14, 8:14 pm, Yaojian sky...@gmail.com wrote: I wonder

[nhusers] Re: Multi language implementation

2009-06-24 Thread Fabio Maulo
2009/6/24 Michal Gabrukiewicz mga...@gmail.com here is a detailed description of how i did solved the multi language problem: http://www.webdevbros.net/2009/06/24/create-a-multi-languaged-domain-model-with-nhibernate-and-c/ Thanks Michal!! Do you want share it in the NH-Forge How to wiki ?

[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread Stefan Nobis
Fabio Maulo fabioma...@gmail.com 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). --

[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread Fabio Maulo
Ah ok... There shouldn't work because it is pure SQL and NH only touch it to add the root alias and nothing more. For All: I would remember you that the mapping file has very few features regarding multi-RDBMS SQLs support. If I well remember there is only one place : database-object and its

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

2009-06-24 Thread jods
Hello, I have a mapping where the class T1 has a composite id, which contains a reference to the class T2. This works all fine, I can load both classes, same them, and so on. My issue is performance-related. I would like to eager-load the T2 reference, but I absolutely can't manage to do it.

[nhusers] HQL syntax question using in

2009-06-24 Thread sed
I'm sorry, I haven't seen an example of how to do this so far. I have an Int64[] array and I want to do something like this; from Entity where Entity.ID in (:entityID) and set :entityID to the Int64 array items. Is this possible? Thanks in advance.

[nhusers] Re: HQL syntax question using in

2009-06-24 Thread Fabio Maulo
query.SetParameterList(entityID, new[]{1,2,3}); 2009/6/24 sed sethaedwa...@gmail.com I'm sorry, I haven't seen an example of how to do this so far. I have an Int64[] array and I want to do something like this; from Entity where Entity.ID in (:entityID) and set :entityID to the Int64

[nhusers] Re: HQL syntax question using in

2009-06-24 Thread sed
Thanks! On Jun 24, 4:07 pm, Fabio Maulo fabioma...@gmail.com wrote: query.SetParameterList(entityID, new[]{1,2,3}); 2009/6/24 sed sethaedwa...@gmail.com I'm sorry, I haven't seen an example of how to do this so far. I have an Int64[] array and I want to do something like this; from

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

2009-06-24 Thread John Rayner
If you are passing parameters into your TVF (and into CONTAINSTABLE) then it will need to be a custom SQL query. If you aren't passing any parameters in then you have the option of using a view instead of a TVF. Out of interest, why do think that a parameter-less TVF won't work for joins and

[nhusers] How to handle FK exception within ITransaction

2009-06-24 Thread TheBread
Hello, I have searched all over and have not found a complete answer to my issue. I have a WPF application that uses NH for persisting to a MS SQL database. I am using single Session throughout the application. Everything works fine until I get an exception (like a FK constraint) while

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread Fabio Maulo
Take care because saying I am using single Session throughout the application the Everything works fine is something with a very short life in production. 2009/6/24 TheBread chris.will...@rimrockgroup.com Hello, I have searched all over and have not found a complete answer to my issue. I

[nhusers] Re: Denormalized Domain Model

2009-06-24 Thread mhanney
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 TheSchemaOwner.TheTableName;

[nhusers] Re: calling an oracle stored procedure from nhibernate

2009-06-24 Thread mhanney
If the Oracle stored procedure you need to call does not write to the db, just does some complex select(s), consider creating a view that is built by calling the procedure, then map your C# class to the view columns instead of the ref cursor. Use mutable=false on the class definition in the

[nhusers] Re: NHibernate and .NET 4.0

2009-06-24 Thread Dario Quintana
Why ? The best way to know it is to run the whole suite of tests against the .Net x. But I think it's the same, and it will work ok. On Mon, Jun 22, 2009 at 6:32 AM, Graham Bunce grahambu...@hotmail.comwrote: I'm thinking lazy loading not working properly or session becoming corrupted

[nhusers] Re: Session Management Issues

2009-06-24 Thread John Rayner
This hardly seems worth suggesting because I'm sure you've considered it, but you don't get the problem if you don't have lazy-loading of entities being triggered by your DataGrid. Obviously you might not be able to do this for performance reasons. Cheers, John On Jun 22, 5:16 pm, joshlrogers

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread Fabio Maulo
Aaaah now, I read your mail better and I understand that Everything works fine is just dead. -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send email to

[nhusers] Re: calling an oracle stored procedure from nhibernate

2009-06-24 Thread Fabio Maulo
With mutable=false should be enough 2009/6/24 mhanney mrh5...@gmail.com If the Oracle stored procedure you need to call does not write to the db, just does some complex select(s), consider creating a view that is built by calling the procedure, then map your C# class to the view columns

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread The Bread
I appreciate your help. I gather from your posts that you are suggesting that using a single Session throughout the application is not good practice. If I were to implement a Session per view/form/ operation would I not still have the same issue if I received a constraint exception while

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread Fabio Maulo
The problem with session-per-application is not only the stale-entity-state but the session-cache.session-per-application more than an anti-pattern is a simple time-bomb. stale-entity-state should be managed closer as you done but if you have only one session, for the whole application, the next

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread Fabio Maulo
Try to use our Deep grok to quick find related issue NH-WPF for example searching: WPF session managementThis is the link http://nhibernate.deepgrok.com/ 2009/6/24 Fabio Maulo fabioma...@gmail.com The problem with session-per-application is not only the stale-entity-state but the

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread The Bread
Hi Fabio, I think I understand the issue with the session cache being a time bomb. On form exit I have either called Session.Clear() to cancel any changes, or persist the changes with one of the methods above (Add, Update, Delete). Would this pattern take care of the cache issue, or do

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread The Bread
I just saw this post, and will take a look now On Jun 24, 5:08 pm, Fabio Maulo fabioma...@gmail.com wrote: Try to use our Deep grok to quick find related issue NH-WPF for example searching: WPF session managementThis is the linkhttp://nhibernate.deepgrok.com/ 2009/6/24 Fabio Maulo

[nhusers] Re: How to handle FK exception within ITransaction

2009-06-24 Thread Fabio Maulo
2009/6/24 The Bread chris.will...@rimrockgroup.com Hi Fabio, I think I understand the issue with the session cache being a time bomb. On form exit I have either called Session.Clear() to cancel any changes, or persist the changes with one of the methods above (Add, Update, Delete). Would

[nhusers] TransientObjectException with legacy mapping

2009-06-24 Thread x97mdr
Heym I'm trying to map a legacy database system that we have internally that we use to dynamically generate extraction statements from a database. All of the tables use string identifiers and some of the tables have composite keys. I've been trying an initial set of 4 tables and ran into a

[nhusers] Re: Multi language implementation

2009-06-24 Thread Michal Gabrukiewicz
sure why not. i guess i need some access to it ... best regards michal On Thu, Jun 25, 2009 at 12:06 AM, Fabio Maulo fabioma...@gmail.com wrote: 2009/6/24 Michal Gabrukiewicz mga...@gmail.com here is a detailed description of how i did solved the multi language problem:

[nhusers] Re: TransientObjectException with legacy mapping

2009-06-24 Thread Dario Quintana
You are creating your schema into the database with STC.EI.Data.SessionManager.BuildSchema() but the problem is that the schema already exists in there. Try the feature Schema Update. On Wed, Jun 24, 2009 at 10:06 PM, x97mdr jeffreycame...@gmail.com wrote: Heym I'm trying to map a legacy

[nhusers] Re: Multi language implementation

2009-06-24 Thread Dario Quintana
The wiki is open for every registered user. On Wed, Jun 24, 2009 at 11:12 PM, Michal Gabrukiewicz mga...@gmail.comwrote: sure why not. i guess i need some access to it ... best regards michal -- Dario Quintana http://darioquintana.com.ar