[nhusers] Re: Issue with a subquery (possible bug in NH ?)

2010-02-04 Thread graphicsxp
Hi, I'm using NH 2.0, would that be too old ? I'd rather not upgrade as this would involve recompiling other NH plugins I'm using. What is auto import of keywords ?? How do I enable that ? Thanks On 30 jan, 14:11, Fabio Maulo fabioma...@gmail.com wrote: you are using an old version of NH or

[nhusers] Re: Aggregate Root + Collections + Updates

2010-02-04 Thread Nexus
Paul I am a developer who is keen on DDD, so post is your aggregate root and comment is a value object or another entity ? So post has a one-to-many relationship with comment(which seems to be a value object at first glance btw) , this means according to DDD rules comments should only be

[nhusers] Get Table (respectivly Class) from SessionFactory

2010-02-04 Thread Marco
Hello Group :-) I'm writing an NHibernate Application in VB.NET and try to do something like the following: ' -- ' Here we go... Dim tableName as String = NameOfTable Dim

[nhusers] Re: How can I map a value type that contains an entity, where immutability is maintained (by invokin

2010-02-04 Thread Nexus
Hi To be clear a valueobject can have a persistence identifier, it just means that the persistence id has no meaning -- 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

Re: [nhusers] Re: Issue with a subquery (possible bug in NH ?)

2010-02-04 Thread Fabio Maulo
NH2.0 is ~2 years old. About keywords and autoquote http://fabiomaulo.blogspot.com/2009/06/auto-quote-tablecolumn-names.html 2010/2/4 graphicsxp graphic...@googlemail.com Hi, I'm using NH 2.0, would that be too old ? I'd rather not upgrade as this would involve recompiling other NH plugins

Re: [nhusers] Get Table (respectivly Class) from SessionFactory

2010-02-04 Thread Fabio Maulo
I don't understand exactly what you need but: a entity can be spanned in more than one table a table can contain more than one entity and even more than one class 2010/2/4 Marco irresponsible.philosop...@googlemail.com Hello Group :-) I'm writing an NHibernate Application in VB.NET and try to

[nhusers] Re: Get Table (respectivly Class) from SessionFactory

2010-02-04 Thread Marco
So, there is a database with x tables and one class per table. The user is allowed to chose which table-content he/she wants to see, by checking it. I read the selected table and store the name in a string, then I call the SUB to output the content of the selected table. In this SUB I want to

[nhusers] Querying a ternary relationship modeled as a dictionary

2010-02-04 Thread mattcole
Hi, I have an entity Person with a property like: public virtual IDictionaryGroup, AdministratorRole AdministratorRoles and I'd like to write a query that would give me all the groups for a Person using the criteria API. More specifically, a Group has a collection called PeopleInGroup and this

[nhusers] Re: Get Table (respectivly Class) from SessionFactory

2010-02-04 Thread Marco
Another question in this context is: If I add an assembly to a SessionFactory, where do I find this entry later to read it? (In this case ParkingLotsDB.ParkingLot.ParkingLot) ' Add Assembly cfg.AddAssembly(Assembly.GetAssembly(GetType(ParkingLotsDB.ParkingLot.ParkingLot))) ' Create Session

Re: [nhusers] Re: Get Table (respectivly Class) from SessionFactory

2010-02-04 Thread Fabio Maulo
no where 2010/2/4 Marco irresponsible.philosop...@googlemail.com Another question in this context is: If I add an assembly to a SessionFactory, where do I find this entry later to read it? (In this case ParkingLotsDB.ParkingLot.ParkingLot) ' Add Assembly

[nhusers] Fetching ItemLink + Count of Children in one query

2010-02-04 Thread Kevin Fairclough
Hi This should be easy to do, but I cannot figure it out. I have a recursive object ItemLink object which contains a list of itself ChildLinks I want to get the next level of links with a count of links at the following level, i.e. the child count. Session.CreateQuery(select i, count(children)

RE: [nhusers] Re: Aggregate Root + Collections + Updates

2010-02-04 Thread Paul Hinett
Hi, I've decided to treat my comments as a aggregate root in this instance as their maybe hundreds of comments at a time and it's a fairly high traffic website, loading that many comments every time doesn't make sense for performance sake. Thank you for the feedback! Paul -Original

[nhusers] NHibernate generating invalid Sql when using SetMaxResults on SqlQuery

2010-02-04 Thread ipa
When applying Paging (using SetFirstResult and SetMaxResults) to a SqlQuery, with nHibernate 2.1.1 GA and ActiveRecord 2.0.1 the following sql is generated: SELECT TOP 40 FROM (, ROW_NUMBER() OVER(ORDER BY account.Name, account.State) as __hibernate_sort_row select account.Name

[nhusers] DetachedCriteria with a StatelessSession

2010-02-04 Thread Berryl Hesh
Hello Is there an API I'm missing to execute a DetachedCriteria with a StatelessSession? Cheers, Berryl --- CODE: WHAT I WOULD LIKE TO DO BUT WITH STATELESS SESSION - IEnumerableLegacyProject found; using (var session = BrownNHibBootstrapper.SessionFactory.OpenSession()) {

[nhusers] Re: WCF And NHibernate: enable lazy loading

2010-02-04 Thread José F . Romaniello
feel free to contact us in the unhaddins list! On 4 feb, 04:08, Peter Derwa santo...@gmail.com wrote: nvm i found it! looking into it now On 4 feb, 07:17, Peter Derwa santo...@gmail.com wrote: so i'm not alone :) thank god! I'm sorry i didn't work with google code yet. how can i

[nhusers] Re: WCF And NHibernate: enable lazy loading

2010-02-04 Thread José F . Romaniello
BTW after see Ado.Net RIA services and things like that, I feel more interesting this subject. On 4 feb, 04:08, Peter Derwa santo...@gmail.com wrote: nvm i found it! looking into it now On 4 feb, 07:17, Peter Derwa santo...@gmail.com wrote: so i'm not alone :) thank god! I'm sorry i

[nhusers] Re: How can I map a value type that contains an entity, where immutability is maintained (by invokin

2010-02-04 Thread Berryl Hesh
I would be inclined to take this as two issues; 1) mapping to domain Sales to db sales. It sure *looks* like you can make an ICompositeUserType to do so, and should. Map your Money.CurrencyObj.CurrencyCode to the column for code, MoneyAmount to the column for amount. 2) keeping the relationship

Re: [nhusers] Re: Get Table (respectivly Class) from SessionFactory

2010-02-04 Thread Diego Mijelshon
Try SessionFactory.GetAllClassMetadata()... It'll give you a list of all mapped classes. But not the tables. What do you need the tables for anyway? Diego On Thu, Feb 4, 2010 at 12:41, Marco irresponsible.philosop...@googlemail.com wrote: Another question in this context is: If I add an

[nhusers] SessionFactory lifecycle

2010-02-04 Thread Berryl Hesh
Hello It seems convenient to bootstrap a SessionFactory in a simple static bootstrapping class, with a static property that clients can get sessions from as needed; but that feels awkward when it comes time to clean it up. Are there any guidelines as to how to manage the SessionFactory lifecyle?

[nhusers] Re: Issues when using stateless session to update entities with optimistic concurrency

2010-02-04 Thread Paul Batum
Bump! I really don't know what to do about this, and I've been unable to make any further progress on the issue. Any ideas, anyone? Paul Batum On Feb 3, 11:13 am, Paul Batum paul.ba...@gmail.com wrote: Hi all, I am having trouble with usingstatelesssessionto perform updates. Basically, the

Re: [nhusers] DetachedCriteria with a StatelessSession

2010-02-04 Thread Maximilian Raditya
On Fri, Feb 5, 2010 at 1:00 AM, Berryl Hesh ef747...@gmail.com wrote: Is there an API I'm missing to execute a DetachedCriteria with a StatelessSession? AFAIK, it's there only since NHibernate 2.1.x. What NH version do you use? -- Regards, Maximilian Haru Raditya -- You received

[nhusers] Re: WCF And NHibernate: enable lazy loading

2010-02-04 Thread Rhys C
This is an aweful idea. you will find out why in i guess 2-3 months Please dont distribute your NH objects, yeah its sounds like a cool thing to do, but its not. On Feb 3, 3:13 pm, Peter Derwa santo...@gmail.com wrote: Hi Allan, I don't want to remove the lazy loading, i want to overwrite

[nhusers] Nhibernate SQLQuery - IndexOutOfRangeException

2010-02-04 Thread Murali R
Hi, we have a table named Customer which has three sub classes / tables viz. Cust1, Cust2 and Cust3 which are linked by hbm using joined-sub-class. all the 4 tables have CustomerId as the primary Key. A record in customer table will have one record either in Cust1 or Cust 2 or Cust3 table.