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.  [ 3 posts ] 
Author Message
 Post subject: XML mapping Vs .NET Attibutes.
PostPosted: Wed Apr 08, 2009 7:26 am 
Newbie

Joined: Sun Apr 05, 2009 8:00 am
Posts: 8
Mapping is the spirit of any ORM tool.

And as I knew about NHibernate that there is two techniques to do that:


(1) XML mapping
(2) .NET Attributes


I want to know what is the preferred one? and why?

As my opinion I think that Using XML mapping is better for complex applications as i can isolate mapping from my entities and that offer more Interdependency.

what is your opinion?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 08, 2009 11:17 pm 
Beginner
Beginner

Joined: Tue Sep 14, 2004 1:03 pm
Posts: 33
Location: Calgary, Alberta Canada
I prefer XML. If you use attributes, you are basically decorating your business classes. In my opinion this is mixing your persistence layer with your domain. XML lets you separate the mapping from the domain.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 09, 2009 2:44 am 
Regular
Regular

Joined: Wed Feb 11, 2009 10:58 am
Posts: 55
please also see the thread here:

http://forum.hibernate.org/viewtopic.php?t=996286


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