-->
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.  [ 5 posts ] 
Author Message
 Post subject: Learning from DLinq
PostPosted: Thu Sep 22, 2005 4:05 pm 
I had a look at DLinq, and there are some cool concepts there, beyond the language intergration.

Specifically, I like the ability to get generic collections from the get go.

Beyond that, there was a nice concept of a typed collection of EntitySet<T> & EntityRef<T>, both of which accept delegates for adding/removing from the collection, so you do:

posts = new EntitySet<Post>( delegate(Post p) { p.Blog = this; }, delegate (Post p) { p.Blog = null; })

And the reverse (although you obviously going to need only one of them)

blog = new EntityRef<Blog> ( delegate(Blog b) { b.Posts.Add(this); }. delegate(Blog b) { b.Posts.Remove.Add(this); })

Any interest in doing them for NHib?
What is the status for .Net 2 ? ISTR talks about it several months ago, but I can't recall anythign concrete.

At the very least, I think that suporting strongly typed collections is a must. What is needed to add those?


Top
  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 4:46 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Quote:
At the very least, I think that suporting strongly typed collections is a must. What is needed to add those?

Hibernate 3 has UserCollectionType which can be used as an inspiration, or maybe just copied. It will require the user to implement his own collection wrapper though.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 6:29 pm 
Actually, I was talking about providing NHib versions of:

IList<T>
ISet<T>
IDicrionary<T>

etc.

I took a look in NHibernate.Collections, and it seems to be pretty straight forward to do it.
Anything I needs to watch out for?


Top
  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 6:43 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
We just haven't figured out how to integrate it nicely into build process and into NHibernate itself, so that NHibernate would build and work on both .NET1.1 and .NET2.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 7:07 pm 
I've code (Rhino Mocks) that I maintain for both .Net 2 & 1.1

I'm mainly doing something like:

#if dotNet2
dot net 2 coolness
#endif

And then I add a define in the NANT to add dotNet2 for the build if it's compiling for .net 2


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