[nhusers] Re: Contextual data using in clause

2010-01-18 Thread Nieve
Right, I suppose that what I'm doing wrong here is trying to have several parameters (ie 'Milk', 'Bread') being assigned by only one parameter (:current)... So is there another way of having an in clause in a global/contextual filter (apart of in my repository)? On Jan 17, 6:51 pm, Nieve

[nhusers] how implements a derived many-to-one property (if it's possible)

2010-01-18 Thread kor
hi, i have this classes User { long ID; Document LastDocument; } Document { long ID; DateTime Creation; User Creator; } i need that the property LastDocument returns the last document (the documents with the biggest Creation time) of that specified user (it is a read-only

[nhusers] Re: Getting index of a row in a list

2010-01-18 Thread Kent Boogaart
Thanks for the reply Graham. The problem is as follows: You have an item. You know it appears somewhere in a list of all items. You need to find the index in the list at which the item appears. I cannot do this in conjunction with the paging method, because the two are distinct and separate

[nhusers] Re: Is Nhibernate the right choice here?

2010-01-18 Thread stej
Thank you for your reply. Nhibernate 2.1 looks promising. However, if hql is supposed the same as in Hibernate, then the syntax for update statement has its serious constrains. As http://docs.jboss.org/hibernate/core/3.3/reference/en/html/batch.html#batch-direct says the form should be ( UPDATE

[nhusers] ID by Parent Row

2010-01-18 Thread Fernando Zago
Hi guys, I'm really in a problem here... I'm dooing a concourse application, so, i'm using HiLo to generate my ids to table Concourse. Its running fine. but, in my Concourse entity, i have a list of Subscriptions, but, every Subscription have to get ID by the Concourse; Lets me try to explain

[nhusers] Re: ID by Parent Row

2010-01-18 Thread kor
why do you need that the ID of subscription is reset for every concourse? using a unique ID is a lot better, anyhow if you really need it i think that the only way is to set it by yourself in your application when you add a new element to the subscrivers list, but if you do so i suggest you to use

Re: [nhusers] Re: ID by Parent Row

2010-01-18 Thread Fernando Zago
Just for knowledgement, i need it because this ID will be passed by the subscriber, and the Test will be printed with this ID (Also its name and informations), but this ID is the center of the information. thats why i have to restart ID from subscriptions every concourse. and hehe, btw, i can

[nhusers] Using a typedef as a key-property fails

2010-01-18 Thread DanPlaskon
I'm not sure if I'm running into an Nhibernate bug here, or if this just isn't possible. I seem to be having a problem using a typedef as a key-property for my entity. Here are the mappings that fail (only showin relevent sections): Entity Mapping: ?xml version=1.0 encoding=utf-8 ?

[nhusers] Getting Data from all tables instead of one with HQL Query when I shouldn't

2010-01-18 Thread Ben
I have created 3 tables in my database and put data into them. The 3 tables all have foreign keys joining them together. Below are the table classes and there mappings. When I run the query listed at the end I get IList of the objects and they have the data from all 3 tables. However, my HQL

Re: [nhusers] Saving entities with joins in the their mapping

2010-01-18 Thread Oskar Berggren
You are either confused, or express yourself confusingly. :) You don't provide technical details, but it sounds like you are using join when in fact what you have is a one-to-many relationship. Map this with many-to-one in the mapping for User. The join element is when two or more tables should

[nhusers] Re: Saving entities with joins in the their mapping

2010-01-18 Thread Robin Clowers
Hi Oskar, thanks for your response. I'm not sure what technical details you are looking for, but I will try and restate my question more clearly. I have a User table with a foreign key to a UserType table. I would like to have a single entity, User which has the properties from both tables.

Re: [nhusers] Re: Saving entities with joins in the their mapping

2010-01-18 Thread Oskar Berggren
I believe you will not be able to do this with join. The element is for when you have a 1-to-1 relationship. Must the UserType be another table? If you have a group of properties that can together be called UserType, why do you believe it is a good idea to expose them as properties directly on

[nhusers] Re: Saving entities with joins in the their mapping

2010-01-18 Thread Robin Clowers
I am just trying to understand the capabilities of NH, this is not a for a real application (sorry I didn't mention this before). Thanks for your help Oskar, I did not realize join was only for 1 to 1 relationships. On Jan 18, 8:15 am, Oskar Berggren oskar.bergg...@gmail.com wrote: I believe

Re: [nhusers] Using a typedef as a key-property fails

2010-01-18 Thread Fabio Maulo
Probably it is not supported... I have added the typedef support to id but I have never tested it with composite-id (you can imagine why ;) ). In the trunk I have refactorized (better say re-write) all mappings stuff and hopefully it is working there. Can you create a simple behaviour-test ? If

[nhusers] Re: modeling/mapping question for unrelated taggable entities.

2010-01-18 Thread ajaishankar
Thanks All This clears it up a bit - like alwin suggested, I'll go with option 1; though it means more tables in DB. Since I don't want to p1ss off the DBAs :-) I was leaning towards the the many-to-any but then querying it without NHibernate would be tougher. Thanks again Ajai On Jan 17,

[nhusers] IndexOutOfRangeException with SetCacheable(true) on GetNamedQuery

2010-01-18 Thread nabils
I think I have encountered a bug. I'm using v 2.1.2.4000 with the following mapping: ?xml version=1.0 encoding=utf-8 ? hibernate-mapping xmlns=urn:nhibernate-mapping-2.2 sql-query name=GetUserSecurity exec getUserSecurity :UserId /sql-query /hibernate-mapping This stored procedure

Re: [nhusers] IndexOutOfRangeException with SetCacheable(true) on GetNamedQuery

2010-01-18 Thread Fabio Maulo
have a look to the intellisense. The sql-query has some others info needed.. as return 2010/1/18 nabils na...@shuhaiber.com I think I have encountered a bug. I'm using v 2.1.2.4000 with the following mapping: ?xml version=1.0 encoding=utf-8 ? hibernate-mapping

[nhusers] NHibernate Linq Full Featured, When?

2010-01-18 Thread spiralni
Hello, I was using NHibernate for a while, and now I think I am totally out of date with this project. My concern is about the Linq support, I understood it was still in its infancy.. Where Can I see the status of this.. and when is it planned to be released? Regard -- You received this

[nhusers] DBType.Object (sql_variant) not supported in MsSql2008Dialect?

2010-01-18 Thread devonl
I have a situation in which I need to map back to an sql_variant column in MSSQL 2008. The data model is set so I have no other options at this point. I realize I need to implement a custom IUserType and found this thread for reference: https://forum.hibernate.org/viewtopic.php?t=987576 I've

[nhusers] Re: How to configure test environment

2010-01-18 Thread djsowa
@Diego - exception was the same @Fabio - I think that was some bug when VS was reading properties of assemblies, because PublicKeyToken of the old version was the same as PublicKeyToken of new version. To resolve this issue I must add this into app.config file of test project: runtime

[nhusers] Re: NHibernate cascade on root object - so many SQL statements

2010-01-18 Thread Graham Bunce
/bump Any comments? Why is the unnecessary (as I understand it) UPDATE being generated by NH? -- 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] Show_sql issues

2010-01-18 Thread nabils
I have spent the whole day trying to work out why show_sql and nhibernate logs through log4net are not showing up in my visual studio output window. Would really appreciate some help. This is driving me insane. For show_sql I have the below in web.config. The config is working fine as I am able

[nhusers] Re: DBType.Object (sql_variant) not supported in MsSql2008Dialect?

2010-01-18 Thread devonl
Well, in answering my own question, indeed it appears the MsSql2008Dialect does not support the sql_variant data type. I've modified a local version of the 2.1.x branch, and along with the SqlVariant IUserType posted in the hibernate.org thread, it seems to work fine. Here is a patch describing my

[nhusers] Re: IndexOutOfRangeException with SetCacheable(true) on GetNamedQuery

2010-01-18 Thread nabils
Thanks for the reply Fabio. I tried what you said (see mapping below) and got this error: NHibernate.Loader.Custom.Sql.SQLCustomQuery: 2010-01-18 23:15:25,456 [1] DEBUG (NHibernate.Loader.Custom.Sql.SQLCustomQuery:0) - starting processing of sql query [exec getUserSecurity :PersonId]

[nhusers] Problem trying to set property type by reflection

2010-01-18 Thread niberhate
I had put this mistakenly in the development group and was asked to ask in this group. So here it goes. I am playing with the HelloNHibernate example of NHibernate In Action. The source code can be downloaded from http://www.manning.com/kuate/NHibernateInAction.Source.zip You will find an