You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Britske <gb...@gmail.com> on 2007/10/18 14:02:35 UTC
template-expansion sees hibernate-entity as java.lang.Boolean?
first of all, excuse me for the post-flood, but I had some standing issues.
Perhaps some of these questions can help others as well so here this one
goes:
I was on a roll until i wanted to include the name of a City-instance
through a template expansion, which gave the error:
Could not convert 'firstresult.poi.city.name' into a component parameter
binding: Class java.lang.Boolean does not contain a property named 'name'
(within property expression 'firstresult.poi.city.name').
However, city is of type City and not op type java.lang.Boolean!
The traversal goes through a POI and a City-class which are both mapped as
hibernate-entities.
the traversal poi.getCity() is a lazy association.
(for you hibernate gurus:
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="cityid", nullable=false)
@Cache(usage =
org.hibernate.annotations.CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private City city;
my expansion looks like::
<t:compositeBlockList t:id="comp1">
<t:parameter name="groupheader">
<div style="padding:5px">
<strong>
${firstresult.poi.city.name}
</strong>
</div>
</t:parameter>
</t:compositeBlockList>
What is causing this error? Could the hibernate-entity City look like a
boolean (when reflection is used) before it is lazily fetched?? I can't
really imagine that but who knows? anyone?
thanks,
Geert-Jan
--
View this message in context: http://www.nabble.com/template-expansion-sees-hibernate-entity-as-java.lang.Boolean--tf4646244.html#a13272202
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: template-expansion sees hibernate-entity as java.lang.Boolean?
Posted by Britske <gb...@gmail.com>.
Has anyone ever experienced something similar? or has anyone used hibernate
lazy-associations succesfully with expansions in T5?
I'm still not sure if it's a hibernate or a tapestry thing.
FYI; the error is happening in:
org.apache.tapestry.internal.services.PropertyConduitSourceImpl.readMethodForTerm(PropertyConduitSourceImpl.java:370)
and states:
Could not convert 'firstresult.poi.city.name' into a component parameter
binding: Class java.lang.Boolean does not contain a property named 'name'
(within property expression 'firstresult.poi.city.name').
//Geert-Jan
Britske wrote:
>
> first of all, excuse me for the post-flood, but I had some standing
> issues. Perhaps some of these questions can help others as well so here
> this one goes:
>
> I was on a roll until i wanted to include the name of a City-instance
> through a template expansion, which gave the error:
>
> Could not convert 'firstresult.poi.city.name' into a component parameter
> binding: Class java.lang.Boolean does not contain a property named 'name'
> (within property expression 'firstresult.poi.city.name').
>
> However, city is of type City and not op type java.lang.Boolean!
>
> The traversal goes through a POI and a City-class which are both mapped as
> hibernate-entities.
> the traversal poi.getCity() is a lazy association.
>
> (for you hibernate gurus:
> @ManyToOne(fetch = FetchType.LAZY)
> @JoinColumn(name="cityid", nullable=false)
> @Cache(usage =
> org.hibernate.annotations.CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
> private City city;
>
> my expansion looks like::
>
> <t:compositeBlockList t:id="comp1">
> <t:parameter name="groupheader">
> <div style="padding:5px">
> <strong>
> ${firstresult.poi.city.name}
> </strong>
> </div>
> </t:parameter>
> </t:compositeBlockList>
>
> What is causing this error? Could the hibernate-entity City look like a
> boolean (when reflection is used) before it is lazily fetched?? I can't
> really imagine that but who knows? anyone?
>
> thanks,
> Geert-Jan
>
>
>
--
View this message in context: http://www.nabble.com/template-expansion-sees-hibernate-entity-as-java.lang.Boolean--tf4646244.html#a13289365
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