users@glassfish.java.net

Re: Toplink - Invalid value for getLong() - 'String' in column 5

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 12 Mar 2007 13:16:23 -0800

Asaf,

Your PU won't work as a SINGLE_TABLE inheritance - you have 2 subclass with two
different persistent field types (Long and String) mapped to the same column
named "VALUE". One mapping will win and instantiating the other instance type
will have a problem that you observe.

regards,
-marina

glassfish_at_javadesktop.org wrote On 03/12/07 12:57,:
> Hey,
> Thanks ofr answering,
>
> I'm not sure if I understood you correctly,
>
> The 'DiscriminatorValue' of AttributeValueString is 'STRING' and AttributeValueLong is 'LONG'.
>
> Taking as a sample the row I got the exception for, it looks like:
> value_id | value_type (DiscriminatorColumn!) | value(Toplink created it as a varchar(255)
> ----------------------------------------------------------------------------------------------------------------------------
> 1 STRING ASDFASDF
>
>
> The DiscriminatorValue correspond to the AttributeValueString, why would it be readed as AttributeValueLong at all?
>
>
>
> Yet again - many thanks...
>
> Asaf.
> [Message sent by forum member 'trouby' (trouby)]
>
> http://forums.java.net/jive/thread.jspa?messageID=207517
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>