mapping Field with variable type using Hibernate Annotaion

Posted by Zahra on Stack Overflow See other posts from Stack Overflow or by Zahra
Published on 2010-06-09T19:08:04Z Indexed on 2010/06/09 19:12 UTC
Read the original article Hit count: 228

Filed under:
|
|

Hi.

how can I have a field with variable type in my class? I use hibernate annotation for mapping to DB. I tried to use java.io.Serializable as field's type, but it mapped to database as a 01 amount which is true if I get it's object and cast it to it's true type. but I need to run a query on this objects that needs true amount of field.(right now I can't compare an integer field with a number) Does anyone have any idea how can I do this?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate