2

I have a trouble whit eclipselink and postresql

I use Glassfish 3.1.2 and his eclipselink for connect to a postgresql database with persistence, in my table I have an postresql large object file that in my entity is convert into bytearray with @lob annotation.

When I try to save a new record with the file postgresql say this:

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): 
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: column "attoid" is of type oid but expression is of type bytea
  Hint: You will need to rewrite or cast the expression.

The same code on Hibernate work well.

I have try to search on google or here but I don't found nothing...someone can help me?

Chris Travers
  • 25,424
  • 6
  • 65
  • 182
max
  • 21
  • 3
  • Yet another exact duplicate of http://stackoverflow.com/questions/3677380/proper-hibernate-annotation-for-byte – Chris Travers Apr 05 '13 at 06:44
  • @Chris Travers i have to disagree with you, this problem is about eclipselink, while link with you provided contains answer specific for hibernate – user902383 Aug 09 '13 at 12:26

0 Answers0