I don't know if this is a clue but this is what I see in debug, when
it's dealing with the TeamFan metadata. Just not sure if
"HandlerFieldStrategy" is correct or not..
2008-10-16 10:56:08,472 [btpool0-1] DEBUG openjpa.MetaData - Resolving
field "com.protrade.fandom.data.entities.TeamFan@27999450.fan".
2008-10-16 10:56:08,472 [btpool0-1] DEBUG openjpa.MetaData - "fan" has
mapping strategy "org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
Fernando Padilla wrote:
> thank you for replying!
>
> Fan and TeamFan are entities of course. They extend a MappedSuperclass.
> Here are the four classes involved in this query. Fan and TeamFan
> extend HBaseIdCreateTime, which extends HBaseId.
>
> And just to recap from last email:
>
> I load a "Fan" object via the "fbId" field, and that works just fine.
> Then I try to load a "TeamFan" object via that "Fan" object just loaded,
> and a "teamId". But it complains that the Fan is not a valid type:
>
> <openjpa-1.2.0-r422266:683325 nonfatal user error>
> org.apache.openjpa.persistence.ArgumentException: The specified
> parameter of type "class com.protrade.fandom.data.entities.Fan" is not a
> valid query parameter.
>
>
>
>
>
>
>
> @Entity
> @Table(name = "TEAMFAN")
> public class TeamFan extends HBaseIdCreateTime {
> @Column(name = "FAN_JDOID")
> private Fan fan;
>
> @Column(name = "TEAMID")
> @Externalizer("getIdLong")
> private FbTeamId teamId;
> .....
>
>
> @Entity
> @Table(name = "FAN")
> public class Fan extends HBaseIdCreateTime implements UnifiedSocialUser{
> @Column(name = "BEBOID")
> private Long beboId;
> @Column(name = "FBID")
> private Long fbId;
> @Column(name = "HI5ID")
> private String hi5Id;
> @Column(name = "MOSID")
> private String mosId;
> .....
>
>
> @MappedSuperclass
> public class HBaseIdCreateTime extends HBaseId implements
> BaseIdCreateTime {
> @Basic
> @Column(name = "CREATETIME")
> private long createTime;
> .....
>
>
> @MappedSuperclass
> public class HBaseId extends BaseObject implements BaseId, Serializable{
> @Id
> @Column(name = "JDOID")
> @GeneratedValue
> private Long id;
>
> @Version
> @Column(name = "JDOVERSION")
> private long jdoversion;
> .....
>
>
>
> Jeremy Bauer wrote:
>> Hi Fernando,
>>
>> Is TeamFan also defined as an entity and is there an inheritance
>> strategy defined for the Fan - TeamFan hierarchy? If not, you'll need
>> to make sure you have a valid JPA inheritance hierarchy & strategy.
>> If this is the case, could you post your entity classes or even
>> better, a failing test case?
>>
>> -Jeremy
|