Feature Requests item #684442, was opened at 2003-02-11 19:02 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428711&aid=684442&group_id=40712
Category: None Group: None Status: Open >Priority: 1 Submitted By: Jonas Van Poucke (jvpoucke) Assigned to: Nobody/Anonymous (nobody) Summary: Define datasource name in mapping file Initial Comment: Could it be possible to map a class to an arbitrarily named SessionFactory. Something like: <hibernate-mapping> <class data-source="MyFactory" name="com.acme.example.MyClass" table="TABLE"> <id name="id" column="ID" type="long" unsaved- value="0"> <generator class="native"/> </id> <property name="firstProp" column="someRecord" type="string"/> <property name="secondProp" column="R2D2" type="string"/> </class> </hibernate-mapping> Of cource, "MyFactory" is just an alias for a SessionFactory configured using Hibernate.configure() and come from JNDI or a DataStore. The purpose of this change is that sometimes one object comes from database Y and the other from database X. Now, I have to select the sessionfactory for each object in some code. I would prefer to do that in the mapping file (no recompile). Does this sound as a good idea? Is there a better method? Jonas Van Poucke ---------------------------------------------------------------------- >Comment By: Gavin King (oneovthafew) Date: 2003-02-12 13:07 Message: Logged In: YES user_id=384580 This would be a big architectural change to Hibernate and I am not at all convinced of its value at this stage. Sorry.... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428711&aid=684442&group_id=40712 ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel