-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Doc typos and bugs on Shards
PostPosted: Sat May 05, 2007 10:51 pm 
Newbie

Joined: Thu Jul 21, 2005 10:19 pm
Posts: 13
The example code for creating createSessionFactory is missing a few ")":

Code:
         shardConfigs.add(new Configuration().configure("shard0.hibernate.cfg.xml");


Missing "Shard" at:

Code:
      ShardStrategyFactory shardStrategyFactory = new StrategyFactory() {


Misses a semi-collon:

Code:
        }
        return shardStrategyFactory;


Regards

_________________
http://www.caelum.com.br
xstream, paranamer and waffle .codehaus.org


Last edited by Guilherme Silveira on Sat May 05, 2007 11:00 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Country
PostPosted: Sat May 05, 2007 10:59 pm 
Newbie

Joined: Thu Jul 21, 2005 10:19 pm
Posts: 13
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)

_________________
http://www.caelum.com.br
xstream, paranamer and waffle .codehaus.org


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 06, 2007 5:35 pm 
Contributor
Contributor

Joined: Fri Feb 11, 2005 8:15 pm
Posts: 31
Thanks for the reports! The first issue has already been filed and fixed (http://opensource.atlassian.com/project ... /HSHARDS-5). I'll file the second one in JIRA under documentation. I saw your comment that you didn't want to file JIRA issues but that's really the right spot, so please don't hesitate to file other problems there in the future.

Thanks!
Max


Top
 Profile  
 
 Post subject: Re: Country
PostPosted: Mon May 14, 2007 1:36 pm 
Newbie

Joined: Thu Jul 21, 2005 10:19 pm
Posts: 13
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

_________________
http://www.caelum.com.br
xstream, paranamer and waffle .codehaus.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.