Hi,
Sorry for cross-posting. I didn't realize a seperate Shards channel.
I am exploring Hibernate Shard for my needs. I have master data on Shard-0. I need to route the data to multiple databases, based on routing rules.
Taking the follwing example in weather.hbm.xml,
Code:
<hibernate-mapping package="org.hibernate.shards.example">
<class name="WeatherReport" table="WEATHER_REPORT">
<id name="reportId" column="REPORT_ID" type="big_integer">
<generator class="org.hibernate.shards.id.ShardedUUIDGenerator"/>
</id>
<property name="continent" column="CONTINENT"/>
<property name="latitude" column="LATITUDE"/>
<property name="longitude" column="LONGITUDE"/>
<property name="temperature" column="TEMPERATURE"/>
<property name="reportTime" type="timestamp" column="REPORT_TIME"/>
</class>
</hibernate-mapping>
I don't have identical column names on alls shards, because of different database vendors. I have column name TEMPERATURE in shard-0. In Shard-1, it is HEAT. How do I map HEAT in the hibernate mapping for Shard-2?
I apperciate your help.
Thanks.
Rockmania.