These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Maximum size of NHibernate persisted class
PostPosted: Wed Sep 27, 2006 8:18 am 
Newbie

Joined: Wed Sep 27, 2006 8:06 am
Posts: 4
Location: London, UK
We have pretty large classes which we persist using NHibernate.
I raised issue NH-655 on the NHibernate Jira--for which there was a workaround--and the issue was closed with the remark that
Quote:
probably the classes are just too big.


Could someone please supply a guideline as to what is "too big"? How many properties, relationships to other objects and sets of child objects would be regarded as too many? Or is it inappropriate to have a rule of thumb for this?

Thanks

Ian Douglas


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 10:36 am 
Regular
Regular

Joined: Tue May 31, 2005 3:18 pm
Posts: 117
Location: Houston
by "Too Big", what are we talking about?

how many lines is your mapping file?

_________________
------------------------------
Ben Scheirman
http://www.flux88.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 10:46 am 
Newbie

Joined: Wed Sep 27, 2006 8:06 am
Posts: 4
Location: London, UK
We have a mapping file per entity and there are about 220 entities. The largest entity has 13 child sets, and about 190 properties and many-to-one references to other objects. The objects in the child sets also have--in some cases--numerous properties and many-to-one references, as do the objects referred to via many-to-ones.

It would be quite an exercise to go though all the mapping files to produce a total, because this is a large application.

_________________
Ian Douglas

Royal Bank of Scotland Group (RBS)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 11:11 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
If you can supply a failing test case for the bug, I will certainly look into fixing it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 11:12 am 
Regular
Regular

Joined: Tue May 31, 2005 3:18 pm
Posts: 117
Location: Houston
Right, that sounds huge and hard to measure.

But this strikes me as a smell:
Quote:
and about 190 properties and many-to-one references to other objects
.

I don't to suggest that your object model is bad (b/c I don't know your domain/problem) but I can see why this might be difficult to work with in NHibernate.

I mean, does this object map to a single table? A single table with 190 columns?

_________________
------------------------------
Ben Scheirman
http://www.flux88.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 11:31 am 
Newbie

Joined: Wed Sep 27, 2006 8:06 am
Posts: 4
Location: London, UK
I'd be a little hesitant in providing a full test case (which I'd have to reconstruct anyway), because potentially I'd be letting the intellectual property of a very large commercial bank out of the door.

The three largest tables in our database schema--which are mapped using NHibernate--have 225, 116 and 110 columns respectively. This is not unheard of in applications such as the one I'm working on, and the DBMS (Oracle) can cope with this scenario without difficulty.

_________________
Ian Douglas

Royal Bank of Scotland Group (RBS)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 1:07 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
But I don't have any interest in the intellectual property of a very large commercial bank. All I care about is to have a class structurally similar to that of yours, including the implementation of GetHashCode and other things that may be relevant to the problem, and a simple test that shows the bug.

I understand that it requires some effort on your side to provide this test case but you are the only person so far who experienced the problem.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 1:20 pm 
Newbie

Joined: Wed Sep 27, 2006 8:06 am
Posts: 4
Location: London, UK
Unfortunately I don't have time to recreate a complex set of classes of the type required. I'm in the middle of a project.

The unit tests in the NHibernate.Test assembly don't seem to include any class with a large number of properties (although I haven't checked all the test fixtures). How much testing for this type of usage--numerous properties, numerous many-to-one relationships, numerous sets--has been done on NHibernate?

_________________
Ian Douglas

Royal Bank of Scotland Group (RBS)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 9:37 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Quote:
How much testing for this type of usage--numerous properties, numerous many-to-one relationships, numerous sets--has been done on NHibernate?

No such testing has been done on NHibernate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.