Guilherme Silveira wrote:
weather.hbm.xml should be:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping package="org.hibernate.shards.example.model">
<class name="WeatherReport" table="WEATHER_REPORT">
<id name="reportId" column="REPORT_ID" type="long">
<generator class="org.hibernate.shards.id.ShardedTableHiLoGenerator"/>
</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>
(no country, no city, but continent, latitude, longitude)
(I did not want to file an jira issue for those problems)
The above code still has to be updated to make use of BigDecimal where needed.
Next time i fill a jira issue with patch to make it easier, if there is a next time... :)
Regards