tags:

views:

73

answers:

1

Hi, I am working query with little idea of what software I am dealing with and minimum knowledge HQL.

What I am looking is,

SELECT Entity1 FROM Entity AS Entity1
WHERE (EXISTS ELEMENTS(Entity1.config.dateTimeInfo.ntpConfig.server) )

But I want to set a condition saying

WHERE count(ELEMENTS(Entity1.config.dateTimeInfo.ntpConfig.server) > 3)

Can any one please tell me how to achaive it?

Regards, sam

A: 

It looks like you're trying to select rows based on the size of a collection, which should be:

WHERE size(Entity1.config.dateTimeInfo.ntpConfig.server) > 3

For more info, check out the Hibernate documentation.

Adrian