From: NHibernate J. <nh...@gm...> - 2009-08-18 11:19:37
|
[ http://nhjira.koah.net/browse/NH-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18607#action_18607 ] Ayende Rahien commented on NH-1921: ----------------------------------- Take a look at what XML entities are, they are a way to import some XML from another file. It looks somewhat like this: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" [ <!ENTITY usageTracking SYSTEM "file:./UsageTrackingComponent.xml"> ]> <hibernate-mapping> <!-- CVS: $Id: DynamicEnum.hbm.xml,v 1.3 2004/01/19 03:57:29 eepstein Exp $ --> <class name="com.publishworks.common.DynamicEnum" table="dynamic_enum" schema="common" > &usageTracking; </class> </hibernate-mapping> > Possibility to improve hbm.xml Mapping file configuration > --------------------------------------------------------- > > Key: NH-1921 > URL: http://nhjira.koah.net/browse/NH-1921 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 2.0.1.GA > Reporter: BNReddy > Priority: Minor > Attachments: Child.xml, Parent.hbm.xml > > > My project is having a lot of hbm.xml files in which most of the hbm.xml files are having same component configuration. > Problem is if add/remove a member which should be reflected under database leads to update all hbm.xml files where it is configured. > I can make it as a separate entity and I can proceed. Other than this solution, is there any other solution. > If not, why can't NH allow to use <xi:include href="filename"/> concept. Providing separate xml file for component and ref the xml file where it is required. > Future changes requires to change only one xml file which will reduce all refered xml files update. > Please find the attached sample xml files. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://nhjira.koah.net/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |