1.2 + postgres + @Lob String

291 views
Skip to first unread message

bryan.w

unread,
Apr 14, 2011, 12:16:55 AM4/14/11
to play-framework
Just incase anyone else has this problem (or perhaps has a better
solution.) After upgrading to 1.2, was seeing errors on text fields
("Bad value for type long" ...)

The field in my model class was defined similar to what is seen in the
yabe example:

@Lob
@Required
@MaxSize(10000)
public String content;

Apparently the hibernate upgrade broke this on PostgreSQL.

Seems to be fixed by adding @Type(type="org.hibernate.type.TextType")

Dominik Dorn

unread,
Apr 20, 2011, 7:32:40 AM4/20/11
to play-fr...@googlegroups.com
Thanks, I was having the exact same issue.

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

--
Dominik Dorn
http://dominikdorn.com
http://twitter.com/domdorn

Skripten, Mitschriften, Lernunterlagen, etc. findest Du auf
http://www.studyguru.eu !

Jörg Viola

unread,
Apr 10, 2012, 3:12:49 PM4/10/12
to play-fr...@googlegroups.com
;-)
Just in case anyone tries this with Play 2.0 and EBean and wants to bypass lazy loading, the correct annotations are:
@Lob
@Basic(fetch=FetchType.EAGER)

Sorry for hijacking an old thread.
Reply all
Reply to author
Forward
0 new messages