[nhusers] Re: Future of NHibernate

2010-06-09 Thread Tommaso Caldarola
If well written a future change should not impact a lot of your code. On 8 Giu, 17:58, Red Tiger tobyjander...@gmail.com wrote: We're in the process of choosing an ORM, and we're looking at either NHibernate or Entity Framework.  Please don't take this question the wrong way, but how does the

[nhusers] OOT: Hibernate User Group

2010-06-09 Thread Hendry Luk
Does anyone know any? I joined java-hibern...@googlegroups.com, but the only activities it has ever had seems to be its continous flow of job vacancy spams. There's no sign of humans life, unless they're all hibernating (pun clearly intended), and obviously there's no response to the question I

[nhusers] Why do the methods on entities need to be virtual?

2010-06-09 Thread xpista
Hello, I am trying to add a method on the entity class which will pair the parent-child association ends. The NH is complaining that the method need to be virtual. - Why is that? - Is there a way to specify that NH generated proxy should not override? Thanks, Stefan code: private

[nhusers] Bug on loading dynamic component using dynamic mapping

2010-06-09 Thread mhilaire
Hi all, I am using NHibernate 2.1, .Net 3.5, Oracle 9g and LinFu as proxy. I follow the very good tutorial on dynamic mapping on this blog http://ayende.com/Blog/archive/2008/05/01/Dynamic-Mapping-with-NHibernate.aspx Everything is ok with the configuration and sessionFactory. But i have a bug on

RE: [nhusers] Why do the methods on entities need to be virtual?

2010-06-09 Thread Roger Kratz
- Why is that? What if you access eg _starts in your AddStartCondition method? NH/Proxy fw don't know this and it might lead to runtime errors. - Is there a way to specify that NH generated proxy should not override? I think you can inject your own ProxyFactoryFactory to create your own

[nhusers] Bug on loading dynamic component using dynamic mapping

2010-06-09 Thread mhilaire
Hi all, I am using NHibernate 2.1, .Net 3.5, Oracle 9g and LinFu as proxy. I follow the very good tutorial on dynamic mapping on this blog http://ayende.com/Blog/archive/2008/05/01/Dynamic-Mapping-with-NHibernate.aspx Everything is ok with the configuration and sessionFactory. But i have a bug on

RE: [nhusers] Why do the methods on entities need to be virtual?

2010-06-09 Thread Roger Kratz
...if it's important to avoid virtual methods you can create the proxies from an interface instead. -Original Message- From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of Roger Kratz Sent: den 9 juni 2010 11:14 To: nhusers@googlegroups.com Subject: RE:

[nhusers] Id is not set when persisting collections mapped with guid id strategy

2010-06-09 Thread Yannick
Hello, I recently noticed that the id of a new entity which is added to a collection of an aggregate root is not set when I save the aggregate root. Even though all classes have been configured to use the guid id strategy and the collection is mapped to cascade. Once the transaction commits and I

[nhusers] Re: Bug on loading dynamic component using dynamic mapping

2010-06-09 Thread mhilaire
Sorry, i forgot the mapping : class name=NodeReference table=PROJECT id name=ID column=ID generator class=hilo / /id dynamic-component name=Properties /dynamic-component /class On 9 juin, 11:08, mhilaire hilaire.max...@gmail.com wrote: Hi all, I am using NHibernate

Re: [nhusers] OOT: Hibernate User Group

2010-06-09 Thread Diego Mijelshon
Their community seems to be forum-based... check https://forum.hibernate.org/ Diego On Wed, Jun 9, 2010 at 05:29, Hendry Luk hendrym...@gmail.com wrote: Does anyone know any? I joined java-hibern...@googlegroups.com, but the only activities it has ever had seems to be its continous flow

[nhusers] Traverse from one object to another dynamically in NHibernate

2010-06-09 Thread Manoj
I am having a question I could not get answer of on internet and looking forward to this group. I am having a data model implemented using NHibernate 2. I have a unique requirement of traversing from one object to another in the data model dynamically. I can manually write code to traverse from

Re: [nhusers] Traverse from one object to another dynamically in NHibernate

2010-06-09 Thread Diego Mijelshon
Manoj, It would help a lot if you explain what your model object looks like, and at least a simple concrete example of what you are trying to achieve. Diego On Wed, Jun 9, 2010 at 09:29, Manoj agrawal.manoj2...@gmail.com wrote: I am having a question I could not get answer of on internet

[nhusers] AJAX NHibernate

2010-06-09 Thread tqwhite
I am working on a javascript application using MVC.NET/NHibernate for persistence. I am new to the .NET and ORM worlds. I have a fair amount of Javascript experience though not really at this level of complexity. That level of complexity is pretty high. I am basically modeling a school district,

[nhusers] Re: Cascade problem

2010-06-09 Thread tqwhite
Looking back over this post, it might be clearer if I had phrased When I edit details in the category object, as When I edit data in the category object instead. tqii -- You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send email

Re: [nhusers] Re: Cascade problem

2010-06-09 Thread John Davidson
We need to see your mappings for Category, to start a meaningful discussion. John Davidson On Wed, Jun 9, 2010 at 12:24 PM, tqwhite tqwh...@gmail.com wrote: Looking back over this post, it might be clearer if I had phrased When I edit details in the category object, as When I edit data in

Re: [nhusers] AJAX NHibernate

2010-06-09 Thread Mohamed Meligy
Can you put an example situation you are into and what are the design ways you are considering to choose from (or looking for better options than them) ? -- Mohamed Meligy Senior Developer (Microsoft Technologies - Technical Delivery) Injazat Data Systems P.O. Box: 8230 Abu Dhabi, UAE. Direct:

Re: [nhusers] AJAX NHibernate

2010-06-09 Thread Oskar Berggren
DTO=Data Transfer Objects /Oskar 2010/6/9 tqwhite tqwh...@gmail.com: I am working on a javascript application using MVC.NET/NHibernate for persistence. I am new to the .NET and ORM worlds. I have a fair amount of Javascript experience  though not really at this level of complexity. That

Re: [nhusers] AJAX NHibernate

2010-06-09 Thread nadav s
Seems to me that the Presentation layer and most certainly client side script shouldn't case about the data layer and NHibernate Its hard to understand exactly what you wanna do, but i'm guessing you wanna be able to send js objects to the server and back, and have them translated into you're C#

[nhusers] Re: Cascade problem

2010-06-09 Thread tqwhite
I love a meaningful conversation. Thanks for even considering having one. Here is the pertinent mapping elements: class name=DatabaseModel.Models.DistrictInfo, DatabaseModel table=Districts id name=RefId type=guid generator class=guid.comb /generator /id property

Re: [nhusers] Re: Cascade problem

2010-06-09 Thread John Davidson
I note that there are no columns defined in the school class, though you do have properties These presumably are persisted to the database. Also if you are not using NHibernate to generate your database I find it is beeter to leave off the 'type' and 'not-null' attributes John Davidson On

[nhusers] Re: AJAX NHibernate

2010-06-09 Thread tqwhite
I love you guys!! Thanks for taking this seriously. I don't have anyone to discuss this with. You're right, my application should not care about NH and it won't if I can help it. You're also right, I basically want to exchange objects between JS and NH so that a person can use the JS tools to

[nhusers] Re: AJAX NHibernate

2010-06-09 Thread Jason Meckley
NH and AJAX are completely different concerns. NH deals with data access while AJAX is concerned with the user experience on the web. the 2 technologies should never interact directly. if I'm understanding your scenario you want db nh domain (via ajax) UI and UI (via ajax) domain nh db a

[nhusers] Re: Cascade problem

2010-06-09 Thread tqwhite
Thanks. I am using NH to generate the database. This is a new project so I get to take it easy. I use the default column names, too. Also nice and easy. One thing I do have to do is edit out the foreign key constraints. They make it so that NH doesn't work on complicated saves. The chicken or the

[nhusers] Re: NHibernate and SQLAnywhere 9

2010-06-09 Thread Jackie G.
Not sure I follow you here, I looked back and it seems the issue is the fact that the APIs for SQL Anywhere 9 implement the IDbConnect interface, whereas, NHibernate requires the connection class to extend the DbConnection class. The APIs apear fixed in the 10 and 11 versions of SQLAnywhere but my

[nhusers] Problem using SetFetchMode in NHibernate

2010-06-09 Thread curlyfro
i've got this method: public IEnumerableAlbum GetAllAlbumsWithTracks() { var albums = Session.CreateCriteria(typeof(Album)) .SetFetchMode(Tracks, FetchMode.Eager) .SetResultTransformer(new

RE: [nhusers] Problem using SetFetchMode in NHibernate

2010-06-09 Thread Jim Case
use a fetch mode of join instead of eager. -Original Message- From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of curlyfro Sent: Wednesday, June 09, 2010 2:26 PM To: nhusers Subject: [nhusers] Problem using SetFetchMode in NHibernate i've got this method:

Re: [nhusers] Re: Cascade problem

2010-06-09 Thread John Davidson
Does your javascript routines ever set or revise the object keys? That would cause a problem with NHibernate, but you can set an 'assigned' attribute on the key property to get around this problem. John Davidson On Wed, Jun 9, 2010 at 1:32 PM, tqwhite tqwh...@gmail.com wrote: Thanks. I am

[nhusers] Re: Problem using SetFetchMode in NHibernate

2010-06-09 Thread curlyfro
if i don't add SetMaxResult i get back everything in a single query. if i set FetchMode.Join SetMaxResult then i get Tracks. if i set FetchMode.Select SetMaxResult then i get Albums but i get Select N + 1 not a single query. how do i get 10 Albums in a single query? On Jun 9, 2:27 pm, Jim Case

[nhusers] Is there anyway to use a class that implements IDbConnection instead of extending DbConnection?

2010-06-09 Thread Jackie G.
So it seems I can't access SQLAnywhere 9 because the ASAConnection(Old class) implements the IDbConnection interface, while the newer (10-11) SAConnection extends the DBConnection class. Why is this and is there anyway around it? Sorry if this is a repost thought it was a new subject. Here is

Re: [nhusers] ThreadLocalSessionContext and ASP.NET thread agility?

2010-06-09 Thread Diego Mijelshon
Yes, and that's why there are specific session context implementations for web applications. Diego On Wed, Jun 9, 2010 at 13:14, Trinition trinit...@gmail.com wrote: As I understand it, ASP.NET agile threads mean that the thread your request is being processed on could change during the

Re: [nhusers] Re: AJAX NHibernate

2010-06-09 Thread Mohamed Meligy
First, it seems you are taking performance to an extend that it doesn't need to/ Try to google for premature optimization or if you get it already, you know what I'm talking about. Performance shouldn't be a big concern for school application. given I translated this to it's run for few concurrent

Re: [nhusers] ThreadLocalSessionContext and ASP.NET thread agility?

2010-06-09 Thread Oskar Berggren
The basic construct you need is HttpContext.Current.Items. NHibernate comes with a session manager that use this. /Oskar 2010/6/9 Diego Mijelshon di...@mijelshon.com.ar: Yes, and that's why there are specific session context implementations for web applications.    Diego On Wed, Jun 9,

[nhusers] Spring.net Transaction and collections: A collection with cascade=all-delete-orphan was no longer referenced

2010-06-09 Thread Eddie
Hi all. I'm trying to manage collections. I get an error when I use the annotation [Transaction] in my method. The error is A collection with cascade=all-delete-orphan was no longer referenced by the owning entity instance: Cuenta My method [CODE][Transaction] public void

Re: [nhusers] Re: Problem using SetFetchMode in NHibernate

2010-06-09 Thread Diego Mijelshon
SetMaxResults and eager fetch of collections don't mix. This is one approach to collection eager loading: http://ayende.com/Blog/archive/2010/01/16/eagerly-loading-entity-associations-efficiently-with-nhibernate.aspx

[nhusers] Enumerations in one-to-many relationships

2010-06-09 Thread Corey Coogan
Hi gang! I'm using Jimmy's Bogard's enumeration strategy described here: http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/08/12/enumeration-classes.aspx It works great like a component, when some entity is using it for a status or something. I'm having trouble figuring out to do a

Re: [nhusers] Spring.net Transaction and collections: A collection with cascade=all-delete-orphan was no longer referenced

2010-06-09 Thread Oskar Berggren
2010/6/9 Eddie edgar.pab...@gmail.com: Hi all. I'm trying to manage collections. I get an error when I use the annotation [Transaction] in my method. The error is A collection with cascade=all-delete-orphan was no longer referenced by the owning entity instance: Cuenta My method [CODE]  

Re: [nhusers] Spring.net Transaction and collections: A collection with cascade=all-delete-orphan was no longer referenced

2010-06-09 Thread cliff vaughn
On Wed, Jun 9, 2010 at 5:04 PM, Oskar Berggren oskar.bergg...@gmail.comwrote: 2010/6/9 Eddie edgar.pab...@gmail.com: Hi all. I'm trying to manage collections. I get an error when I use the annotation [Transaction] in my method. The error is A collection with cascade=all-delete-orphan

[nhusers] Re: System.IndexOutOfRangeException Message=clazz_

2010-06-09 Thread beto
Does anyone have any idea on why I am not able to run the query? I have a Linq version of the query but I would much rather have the native sql query run since the linq version is slow. Any help would be appreciated. Thank You On Apr 26, 2:00 pm, beto humbertofra...@gmail.com wrote: Hi

Re: [nhusers] Re: Problem using SetFetchMode in NHibernate

2010-06-09 Thread Mohamed Meligy
2 queries (especially if in the same transaction) is better (In general, one select each per path/table/fetch/relation/{name_it}). This is super nice when the batch size is equal to N of selects (or using Future to have the same effect). Having this by default in another ORM (commercial, LLBLGen)

[nhusers] Version and Id Field unsaved value best practices?

2010-06-09 Thread cakee
In our project the contents of one DB are imported into another database. The Id field is often used for data integrity so we cannot clear it out. The current mapping for the id and version fields for every table in the DB looks like this: id name=Id column=id type=Guid unsaved-

Re: [nhusers] Re: System.IndexOutOfRangeException Message=clazz_

2010-06-09 Thread Maciej Szczepanski
It looks like your query does not return Organization entity, as some properties are missing. See: http://nhforge.org/doc/nh/en/index.html#querysql-creating You could also try using AddScalar instead of AddEntitiy, and then load those Organizations based on the keys returned by your query. (This

Re: [nhusers] Version and Id Field unsaved value best practices?

2010-06-09 Thread Fabio Maulo
usaved-value is for those people doing strange/imaginative things. Mere mortals does not need unsaved-value (personally never used). On Wed, Jun 9, 2010 at 6:43 PM, cakee aabr...@gmail.com wrote: In our project the contents of one DB are imported into another database. The Id field is often