From: Gavin K. <Gav...@ex...> - 2002-12-04 21:58:28
|
Just use an XML external entity to save yourself the copy/paste. :) > -----Original Message----- > From: Aapo Laakkonen [mailto:aap...@pr...]=20 > Sent: Thursday, 5 December 2002 6:09 AM > To: hib...@li... > Subject: [Hibernate] Global Components >=20 >=20 > I have need for global components. Here is example of one: >=20 > <component name=3D"metadata" class=3D"eg.Metadata"> > <property name=3D"createdOn" column=3D"created_on"=20 > type=3D"timestamp" unique=3D"false"/> > <many-to-one name=3D"createdBy" class=3D"eg.User"=20 > column=3D"created_by" unique=3D"false"/> > <property name=3D"accepted" column=3D"accepted" type=3D"boolean"=20 > unique=3D"false"/> > <many-to-one name=3D"acceptedBy" class=3D"eg.User"=20 > column=3D"accepted_by" unique=3D"false"/> > <property name=3D"archived" column=3D"archived" type=3D"boolean"=20 > unique=3D"false"/> > <property name=3D"archivedOn" column=3D"archived_on"=20 > type=3D"timestamp" unique=3D"false"/> > <many-to-one name=3D"archivedBy" class=3D"eg.User"=20 > column=3D"archived_by" unique=3D"false"/> > <property name=3D"modifiedOn" column=3D"modified_on"=20 > type=3D"timestamp" unique=3D"false"/> > <many-to-one name=3D"modifiedBy" class=3D"eg.User"=20 > column=3D"modified_by" unique=3D"false"/> > <property name=3D"deleted" column=3D"deleted" type=3D"boolean"=20 > unique=3D"false"/> > <property name=3D"deletedOn" column=3D"deleted_on"=20 > type=3D"timestamp" unique=3D"false"/> > <many-to-one name=3D"deletedBy" class=3D"eg.User"=20 > column=3D"deleted_by" unique=3D"false"/> </component> >=20 >=20 > With current implementation I have to copy this definition to=20 > all of my mapping files that need to provide metadata. Is=20 > there workaround to this? Or is it just me who ever likes to=20 > see this kind of functionality? >=20 >=20 >=20 > Kind Regards > Aapo <b/>ungle Laakkonen >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Microsoft Visual Studio.NET=20 > comprehensive development tool, built to increase your=20 > productivity. Try a free online hosted session at:=20 http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |