[nhusers] Table per class hierarchy and OUTER JOIN

2008-09-16 Thread Jozef Sevcik
Hi all, assuming we have a Customers and Suppliers with CustomerCategory/SupplierCategory. Abstract Category uses table per class hierarchy for CustomerCategory/SupplierCategory. Mappings (simplified, just to focus on Customer*): Customer.hbm.xml: ?xml version=1.0? hibernate-mapping

[nhusers] Re: Schema Export and default data

2008-09-16 Thread Stefan Nobis
Fabio Maulo [EMAIL PROTECTED] writes: 2008/9/16 Stefan Nobis [EMAIL PROTECTED] 2. Manual additions (DEFAULTs, triggers,...) I plan to write a tool to generate all (except 2.) 2 is part of 1a (database-object) Nah, NHibernate doesn't support an easy way to make those RDBMS dependent. I

[nhusers] Re: Session never releases resources

2008-09-16 Thread Fabio Maulo
Bruno...If you have NHibernate in Action take a look to paragraph 5.3.2 in particular read this (from book): Managing the first-level cache Consider this frequently asked question: I get an OutOfMemoryException when I try to load 100,000 objects and manipulate all of them. How can I do mass

[nhusers] Filter alias/relation based on concrete class

2008-09-16 Thread Matt
Using NHibernate 2.0, how can I return all root Person entities that have a dog, say for example I want to return all People that have a Pet of type Dog, where Pets in a polymorphic IPet collection on a Person. I have tried the NHibernate documentation but I can't find how to handle this. I'm

[nhusers] Which revision number in the SVN corresponds to release 2.0.0GA ?

2008-09-16 Thread [EMAIL PROTECTED]
ANyone happen to know - i cant see an obvious comment in the log to indicate which point in time 2.0.0 was taken from --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send email

[nhusers] Re: Transformers for HQL not support yet? (Hibernate3.2 dose)

2008-09-16 Thread crabo
Have you ever tried? I have never successed. s.CreateQuery(select u from User u) .SetResultTransformer(Transformers.AliasToBean(typeof(User)) .List(); I'm not using the generic dao. Test.UserTest.TestHqlTransformer : Spring.Data.NHibernate.HibernateSystemException : Could not execute

[nhusers] Re: Filter alias/relation based on concrete class

2008-09-16 Thread Will Shaver
I don't know how this is supposed to be solved (and would love to know myself) but ended up mapping the class type column as a property in my class thereby allowing me to access it via HQL/Criteria. On Tue, Sep 16, 2008 at 8:12 AM, Matt [EMAIL PROTECTED] wrote: Using NHibernate 2.0, how can I

[nhusers] Re: Transformers for HQL not support yet? (Hibernate3.2 dose)

2008-09-16 Thread Ken Egozi
if User is a mapped entity then you need not the ResultTransformer. simply use: var users = s.CreateQuery(from User u).ListUser(); however, assuming you had a DTO like the following: class UserInfo { string Name {get; set; } string Email {get; set; } } then you can do: var userInfos =

[nhusers] Re: Filter alias/relation based on concrete class

2008-09-16 Thread Ken Egozi
if Pet has relation to Person then this should work: from Person person where exists (from Dog dog where dog.Person = person) I *think* On Tue, Sep 16, 2008 at 9:37 PM, Will Shaver [EMAIL PROTECTED] wrote: I don't know how this is supposed to be solved (and would love to know myself) but

[nhusers] Re: Transformers for HQL not support yet? (Hibernate3.2 dose)

2008-09-16 Thread Fabio Maulo
Ors.CreateQuery(select u.Name, count(*) from User u group by u.Name order by u.Name) .SetResultTrasformer(new YourTransformerYourType()) .ListYourType(); Or s.CreateQuery(select u.Name, count(*) from User u group by u.Name order by u.Name) .SetResultTrasformer(new

[nhusers] Re: Which revision number in the SVN corresponds to release 2.0.0GA ?

2008-09-16 Thread Fabio Maulo
from branches/2.0.x ?r3728 2008/9/16 [EMAIL PROTECTED] [EMAIL PROTECTED] ANyone happen to know - i cant see an obvious comment in the log to indicate which point in time 2.0.0 was taken from -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message

[nhusers] reordering a list

2008-09-16 Thread [EMAIL PROTECTED]
hi, I have a standard object that contains a collection of sections. Each section has a collection of questions. Each question has a display order for example: Q1's display order is 1.1 Q2's display order is 1.2 Q3's display order is 1.3 Q4's display order is 1.4 If I delete Q2, I need to

[nhusers] Re: PDF Library for use with NHibernate?

2008-09-16 Thread Tobes
@Victor I'm running PD4ML on a Debian server with no GUI. Are you sure it's using IE? Are you sure that any of them use IE? Tobin On Sep 16, 3:03 pm, Victor Kornov [EMAIL PROTECTED] wrote: Just be aware that most, if not all, such libs are using IE engine to capture the html, so that becomes

[nhusers] Re: PDF Library for use with NHibernate?

2008-09-16 Thread Victor Kornov
I'm not sure about PD4ML, or most of them, or just any of them. I know some do use it, or did use. I wanted to quickly find a proof link on ajaxian.com, but failed. So, if you want, you cant just ignore me altogether. I simply wanted to give a hint of what to be aware of. Since it's utterly

[nhusers] Wierd issue with query?

2008-09-16 Thread codemonkey
Hi, I have the following query DetachedCriteria criteria = DetachedCriteria.For(typeof (Model.Course), course) .CreateAlias(course.SubjectArea, subjectArea) .CreateCriteria(course.Institution, institution)

[nhusers] Restricting Returned Types in Polymorphic Queries

2008-09-16 Thread Neal Blomfield
If I have an inheritance hierarchy like: Answer (abstract) |-- TextAnswer (abstract) | |-- ShortTextAnswer | |-- LongTextAnswer |-- OptionAnswer (abstract) |-- SelectManyOptionsAnswer |-- SelectOneOptionAnswer |-- RatingScaleAnswer