You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Angelo C." <an...@gmail.com> on 2011/01/08 15:54:25 UTC

t5: something learned from upgrading from 5.1.0.5 to 5.2.4

Hi,

was able to upgrade a mid size t5 app from 5.1.0.5 to 5.2.4, still testing
every aspect, something learned so far:

1) Hibernate 3.6 will be used, so two changes:
       use  "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd" 
in hibernate.cfg.xml
       if there is a mappedBy, you should no include @JoinColumn, following
is not accepted, but accepted in 3.2.x which is used in Tapestry 5.1.0.5:
    @OneToMany(cascade=CascadeType.REMOVE, fetch= FetchType.LAZY, mappedBy =
"detail")
    @JoinColumn(name="detail_fk")
   you have to remove the @Join... which i believe it's correct

2) if you use ArrayList with Model for grid, 5.1.0.5 will have one column
'empty', but 5.2.4 will have an extra column 'size':
        model = beanModelSource.createDisplayModel(ArrayList.class,
_messages);
        model.exclude("size");  // you don't have to do this in 5.1.0.5
        model.get("empty").sortable(false).label("Items");

that's the things I changed up to now to make the upgrade works.

Angelo
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/t5-something-learned-from-upgrading-from-5-1-0-5-to-5-2-4-tp3333160p3333160.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: t5: something learned from upgrading from 5.1.0.5 to 5.2.4

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Sat, 08 Jan 2011 12:54:25 -0200, Angelo C. <an...@gmail.com>  
wrote:

> Hi,

Hi!

> was able to upgrade a mid size t5 app from 5.1.0.5 to 5.2.4, still  
> testing every aspect, something learned so far:
>
> 1) Hibernate 3.6 will be used, so two changes:
>        use   
> "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"
> in hibernate.cfg.xml
>        if there is a mappedBy, you should no include @JoinColumn,  
> following is not accepted, but accepted in 3.2.x which is used in  
> Tapestry 5.1.0.5:
>     @OneToMany(cascade=CascadeType.REMOVE, fetch= FetchType.LAZY,  
> mappedBy =
> "detail")     @JoinColumn(name="detail_fk")
>    you have to remove the @Join... which i believe it's correct

If a field is mappedBy, you should never use other mapping annotations in  
the same field. It doesn't make sense. It seems that 3.6 started checking  
that and throwing exceptions. That's a good thing. Tapestry does this a  
lot.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org