How do I persist a Java property of type Object using Hibernate?

Posted by afielden on Stack Overflow See other posts from Stack Overflow or by afielden
Published on 2009-12-21T16:40:27Z Indexed on 2010/03/16 14:26 UTC
Read the original article Hit count: 166

Filed under:
|

I have a Java class with a property like this

private Object myObj;

When I try to save the class using Hibernate annotations, I get the rather confusing error message "property mapping has wrong number of columns".

What is the correct approach to persisting a class containing a generic property such as this?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about annotations