Search code examples
imagehibernatemyeclipse

How to use image type in hibernate?


I am using myeclipse to reverse engineer from ms sql server to hibernate. and I found when there are a column with the type 'image' in database, after I reverse engineer the table, the 'image' column was converted to 'String' in table definition. So actually what can I do to handle the 'image' type well with hibernate ? What type should I use in my class ?

Thanks in advance !


Solution

  • Check this out: Java Type VS Hibernate Type

    Image type could be represented by binary, CLOB or BLOB equivalent types for SQL Server database, so in Hibernate.

    Check this MySQL example also, and this specific info on binary types on MSSQL, which will serve to develop by analogy the process you need.