Skip to content

Tag: hibernate

Single return type in Hibernate Search

Let’s say I have an app with many different entities, which do not have relations between each other. I would like to create a search that queries all of them, but returns a unified type, i.e: So my idea was to index the entities and put their values into one single index (with same index fields): As yo…

Empty CLOB instead of NULL in Oracle CLOB field

Writing null string into Oracle CLOB field using Hibernate sometimes result in an empty CLOB instead of NULL in the field. Table STEP with a mix of varchar2, number and CLOB fields once was extended with a new CLOB field. and a corresponding field was added to entity All work as expected when non-null value s…

Criteria API how to write = ANY(?1) expression?

I have a query that I want to translate to Criteria API. A query After java processes it (native sql query) the final query looks like this My Question is how to translate = ANY(?1) part to Criteria API? I see that any() definition is How to put array of values to it? I’m using PostgreSQL Answer You wil…