Business Data Model - Text type - @Lob annotation

1
0
-1

Hi,
I have a BDM "Event" with a field "Note" type 'text'.
My db is PostgreSQL.
Bonita saves and reads correctly the data.

I have another web application with Hibernate.
I mapped the Event object with the same Bonita mapping.
Bonita mapping note with this annotation:

@Lob
String note;

When I executed a HQL query
"select Note from Event"
in my application it returns a long value...I aspecting a String value!

I found that with tradition SQL to retrieve a String value the query is:
"select convert_from(loread(lo_open(e.note :: INT, x'40000' :: INT), x'40000' :: INT), 'UTF8') from Event e;"

In hibernate what is the correct HQL query?

Thanks
Manolo

No answers yet.
Notifications