-->
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.  [ 11 posts ] 
Author Message
 Post subject: Development of Dynamic NHibernate
PostPosted: Fri Sep 16, 2005 12:44 pm 
Beginner
Beginner

Joined: Tue Aug 23, 2005 8:15 am
Posts: 45
Hello guys!

I have a few ideas about the extending existing functionality of NHibernate. And would like to discuss them with you. This thread is primary targeted to people how knows the internals of NH.

Ideas are as folows (they were earlier published here:
http://nhibernate.sourceforge.net/forum ... ht=dynamic):

- make NH dynamic (1)
- add to NH classes versions support (2)

idea (1) addresses the feature to change the structure of data model dynamically without recompile source code.
idea (2) could allow keep data when the structure of classes changes


I think that (1) could be done by killing the relation NH class <-> C# class. Instead of using static c# classes it is possible to use dynamic objects with collection of properties, for example:

DynObject manager = new DynObject("Manager");
manager["Name"] = "John"

instead of:

Manager manager = new Manager();
manager.Name = "John";


What do you think: is it possible to port NH in this direction, does NH retrieve a lot of information about classes from reflection? Is it a big work?

instead of dynamic type names of classes could be used.

"Manager" instead of typeof(Manager)

(2) Issue.
NH could have versioning of structure feature.
Dont' have any ideas how. I think additional tables with version labels
could be added to the relation scheme.

Please feel free to discuss these ideas.

Best regards,
Sergey Gerasimov


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 16, 2005 1:32 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
1) should be possible to do with dynamic components, which I'm going to port from H2.1 in the near future.


Top
 Profile  
 
 Post subject: cool!
PostPosted: Fri Sep 16, 2005 4:30 pm 
Beginner
Beginner

Joined: Tue Aug 23, 2005 8:15 am
Posts: 45
I think that is very useful and powerful feature!

Much-much sorry for the next question:
but what is the approximate term when this functionality will be available (in first version)?


sergey wrote:
1) should be possible to do with dynamic components, which I'm going to port from H2.1 in the near future.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 17, 2005 10:38 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
I think one week at most, if I remember to do it :) Not much work is left there, I just need to port a few missing functions.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 10:18 am 
Newbie

Joined: Sat Aug 20, 2005 10:39 am
Posts: 12
Location: Brazil
Hi,

Necessary very of this! It was thinking about abandoning the NHibernate for the lack of this. Without a doubt this is a very important feature.


[]s


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 10:20 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Ok ok, it's in CVS already.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 14, 2005 7:53 pm 
Newbie

Joined: Sat Aug 20, 2005 10:39 am
Posts: 12
Location: Brazil
Hi!

This feature already is functioning?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 16, 2005 7:45 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Did you have any problem using it?
(if so, create a new topic in General Support)

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 17, 2005 8:24 pm 
Newbie

Joined: Sat Aug 20, 2005 10:39 am
Posts: 12
Location: Brazil
It would like to know if it is implemented therefore I did not find nothing the respect in the documentation.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 18, 2005 10:14 am 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
I must be missing something. This doesn't look much different from ADO.NET, with the string-keyed indexer and all that.

Code:
DynObject manager = new DynObject("Manager");
manager["Name"] = "John"

// the DBA renames the "Name" column to "FullName"

// the code breaks !!

I must be missing something. This doesn't look like a good idea.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 20, 2005 7:27 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
the idea of objects is that (amongst others) you wish to work typed.
You are basically suggesting a hashtable.

I agree with k-dub, this is not a good idea.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 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.