[nhusers] Re: NHibernate query

2008-10-31 Thread Ken Egozi
I don't think it's an ANSI SQL thing. I'd guess it's used to return the value of [column_name] in the last record (which in this case, is not well defined as there's no ORDER BY) So you can achieve that by supplying an ORDER, and then limiting to fetch a single row (SetMaxResults(1)) On Sat, Nov

[nhusers] Re: NHibernate query

2008-10-31 Thread Ayende Rahien
What is Last ? On Sat, Nov 1, 2008 at 8:32 AM, Nathan Stott <[EMAIL PROTECTED]> wrote: > > Is there an equivalent to the SQL Last() in NHibernate criteria or HQL? > > As in SELECT LAST(column_name) FROM table_name > > > > --~--~-~--~~~---~--~~ You received this me

[nhusers] NHibernate query

2008-10-31 Thread Nathan Stott
Is there an equivalent to the SQL Last() in NHibernate criteria or HQL? As in SELECT LAST(column_name) FROM table_name --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send ema

[nhusers] Re: How configure Hibernate.cfg.xml file in...

2008-10-31 Thread HelpNH
HI Sean , i tried to change in the mapping but when i debug the project and i wish add a new contact appear this the follow: ___ADOException was unhandled_ could not execute query [ SELECT this_.Id_Contact as Id1_1_1_, this_.Name as Name1_1_, phones2_.Id_Contact as Id4_3_, phones2_.

[nhusers] Re: How configure Hibernate.cfg.xml file in...

2008-10-31 Thread HelpNH
HI Sean , i tried to change in the mapping but when i debug the project and i wish add a new contact appear this the follow: ___ADOException was unhandled_ could not execute query [ SELECT this_.Id_Contact as Id1_1_1_, this_.Name as Name1_1_, phones2_.Id_Contact as Id4_3_, phones2_.

[nhusers] Re: How configure Hibernate.cfg.xml file in...

2008-10-31 Thread HelpNH
Hi Sean, thanks for your support so i must change the mapping to in the files &so doing i must remove the string: gen_ids? is it right? After the file that i changed is it right?? Thanks so much. I wish you happy time. Bye On Oct 31, 6:35 pm, "Sean Carpenter" <[EMAIL PROTECTED]> wrote: > T

[nhusers] Re: Oracle connection string in mono

2008-10-31 Thread Ayende Rahien
Start by doing new OracleConnection("...") until it works. On Fri, Oct 31, 2008 at 10:35 PM, Bruno Matos <[EMAIL PROTECTED]> wrote: > > Ayende Rahien wrote: > > What is the error? > 2008-10-31 20:24:35,095 [2] ERROR NHibernate.Util.ADOExceptionReporter:0 > - Connection parameter not supported: 'G

[nhusers] Re: Oracle connection string in mono

2008-10-31 Thread Bruno Matos
Ayende Rahien wrote: > What is the error? 2008-10-31 20:24:35,095 [2] ERROR NHibernate.Util.ADOExceptionReporter:0 - Connection parameter not supported: 'GISA) (SERVER' Thank you. > > On Fri, Oct 31, 2008 at 10:30 PM, Bruno Matos <[EMAIL PROTECTED] > > wrote: > > >

[nhusers] Re: Oracle connection string in mono

2008-10-31 Thread Ayende Rahien
What is the error? On Fri, Oct 31, 2008 at 10:30 PM, Bruno Matos <[EMAIL PROTECTED]> wrote: > > Hello! > > I'm trying to run an application under linux with mono 1.9, but the > connection string that works with .NET doesn't work with mono. here is > the configuration: > > > > > > >

[nhusers] Oracle connection string in mono

2008-10-31 Thread Bruno Matos
Hello! I'm trying to run an application under linux with mono 1.9, but the connection string that works with .NET doesn't work with mono. here is the configuration: NHibernate.Connection.DriverConnectionProvider NHibernate.Cache.HashtableCacheProvider, NHibernate

[nhusers] Inverse and NHibernate.ObjectDeletedException

2008-10-31 Thread Markus Zywitza
Hi I have three entities Computer - 1 : n - ComputerAssociation - n : 1 - User The collections on both Computer and User are marked with inverse = true. However, when I try to delete a ComputerAssociation, it fails with a NHibernate.ObjectDeletedException:deleted object would be re-saved by cas

[nhusers] RE: Proxied entities...

2008-10-31 Thread Sean Fuhrmann
This method works awesome... One follow up question, is there a way to get from NHibernate what key it will use to load the entity when the proxy is initialized? I know I can build this functionality by hand, but was wondering if there was already an easy way to do it. Thanks again! -Sean F

[nhusers] Re: How to generate nvarchar(max) for a string

2008-10-31 Thread Canton
See if it is the answer. http://confusement.wordpress.com/2007/11/27/nhibernate-and-nvarcharmax/ On Oct 31, 8:25 am, JohnInJax <[EMAIL PROTECTED]> wrote: > I am off and running with NH and ran into a problem where NH defaults > to nvarchar(255) I actually need nvarchar(max). I tried setting > t

[nhusers] How to compare two IProjections in NH 2.0 or 2.1 using Criteria

2008-10-31 Thread Shane
Hey all, we are currently working on a fincial system using NHibernate 2.0 and would really appreciate some help on some queries we are trying to implement. The simplified context of what's going on is that we have deals with stock items and securities and I need to get the query to return all de

[nhusers] Updating many-to-one relationship references

2008-10-31 Thread Jonty
We would like to update many-to-one relationships by simply altering the ID of the object, but NHibernate throws an error: "identifier of an instance of Country was altered from 7 to 8". What is the normal pattern for updating many-to-one relationships? Is it: var user = session.Get(userID); use

[nhusers] Re: How configure Hibernate.cfg.xml file in...

2008-10-31 Thread Sean Carpenter
The issue is that the "sequence" ID generator is not supported on MS SQL Server. You could change the mapping to to have it work on SQL Server. Other ID generator strategies work on SQL Server as well, but "identity" is similar to "sequence" and will work fine for testing. Sean Carpenter On Thu

[nhusers] Re: Extra Join Conditions in NHibernate HQL or ICriteria

2008-10-31 Thread FrederikGheysels
Indeed, there already exists one: http://jira.nhibernate.org/browse/NH-514 On Oct 29, 12:28 pm, "Fabio Maulo" <[EMAIL PROTECTED]> wrote: > 2008/10/29 FrederikGheysels <[EMAIL PROTECTED]> > > > > > This is indeed how I worked around it right now. > > However, I'd like to have the possibility to sp