Beginner |
|
Joined: Thu Aug 19, 2004 5:20 am Posts: 25
|
Hi
Ive got a program that needs to map to a table called "FILES" but depending on various criteria it needs to map to different FILES tables, Eg FILES1, FILES2 etc
how do i set this programatically at runtime so i can use the same mapping file and dont have to create 20 different mapping files(one for each table)
Below is the mapping
Thanks
Hibernate version: 2.1.3
Mapping documents:
<hibernate-mapping>
<class name="FilesObj" table="FILES">
<id name="id" column="id" type ="java.lang.Long" unsaved-value="any">
<generator class="assigned" />
</id>
<property name="data" column="data" not-null="false"/>
<property name="modified" column="modified" not-null="false"/>
<property name="hash" column="hash" not-null="false"/>
</class>
</hibernate-mapping>
|
|