You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by RamAESIS <rs...@hcl.in> on 2009/02/24 08:57:44 UTC
Regarding automatic type conversion of joincolumns
Hi,
I have a requirement as mentioned below:
Table A has a column COL1 of type VARCHAR2, table B has column COL2 of type
NUMBER. When i provide the COL2 as join column for the @OneToMany
annotations OpenJPA is throwing an exception for type mismatch. Is there any
work around or solution to type cast the join column data? Please help.
Regards,
Ram
--
View this message in context: http://n2.nabble.com/Regarding-automatic-type-conversion-of-joincolumns-tp2376667p2376667.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Regarding automatic type conversion of joincolumns
Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
See if externalization on COL2 helps to coerce NUMBER to VARCHAR2 :
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_extern
RamAESIS wrote:
>
> Hi,
>
> I have a requirement as mentioned below:
>
> Table A has a column COL1 of type VARCHAR2, table B has column COL2 of
> type NUMBER. When i provide the COL2 as join column for the @OneToMany
> annotations OpenJPA is throwing an exception for type mismatch. Is there
> any work around or solution to type cast the join column data? Please
> help.
>
> Regards,
> Ram
>
-----
Pinaki
--
View this message in context: http://n2.nabble.com/Regarding-automatic-type-conversion-of-joincolumns-tp2376667p3392950.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Regarding automatic type conversion of joincolumns
Posted by ygmgbg <yg...@gmail.com>.
RamAESIS wrote:
>
> Hi,
>
> I have a requirement as mentioned below:
>
> Table A has a column COL1 of type VARCHAR2, table B has column COL2 of
> type NUMBER. When i provide the COL2 as join column for the @OneToMany
> annotations OpenJPA is throwing an exception for type mismatch. Is there
> any work around or solution to type cast the join column data? Please
> help.
>
> Regards,
> Ram
>
Hello RamAESIS,
I am facing the same problem and i really need to know what you have done to
solve it. Please reply, thanks.
--
View this message in context: http://n2.nabble.com/Regarding-automatic-type-conversion-of-joincolumns-tp2376667p3392388.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.