Contribute  :  Calendar  :  Advanced Search  :  Site Statistics  :  Directory  :  Files to download  :  Links for developers  :  Privacy policy  :  Web Resources  :  Polls  
    MacOSX Guru Site Information, tips and tricks, FAQ for Mac OS X developers    
 Welcome to MacOSX Guru Site
 Sunday, March 24 2019 @ 10:03 AM UTC

JPA @Lob and PostgreSQL

Java DevelopmentLot of discussions with contradictory information on the Net about the problematic, here a quick resume of the "how to"

SQL                               Java

TEXT                             @Lob @Type(type = "org.hibernate.type.TextType")  String
oid                              @Lob java.sql.Blob 
bytea                            @Lob @Type(type = "org.hibernate.type.PrimitiveByteArrayBlobType") byte[]
and in a file named "" available at the root of the classpath:

(and "hibernate.jdbc.use_streams_for_binary" should not be a "property" in persitence.xml as you may find on many sites: this doesn't work, look at the source code of the Hibernate properties loader if you don't believe us !)

What's Related

Story Options

JPA @Lob and PostgreSQL | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
 Copyright © 2019 MacOSX Guru Site
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.07 seconds