collection « Search « JPA Q&A





1. Searching in a collection with JPA/Hibernate    stackoverflow.com

I would like to make a query from an object I have defined that contains a collection. Object looks like this:

@Entity
public class ValidationLog {
    @Embeddable
    ...

2. Hiberante Search and IndexedEmbedded collection    stackoverflow.com

Bean Parent has a collection of Child that should be indexted. To do so I have to define property childs (@OneToMany) and mark it as @IndexedEmbedded. The problem is I ...

3. Searching a collection    forum.hibernate.org

Hi guys I hope you can help me cause I' m stuck on this one. Suppose I have an object Accomodation which may contain equipments (M-M). I would like to perform a query on the equipmentList in Accomodation to check if two or more particular equipments exists. SELECT ALL FROM Hibernate.DAO.Accomodation acc JOIN acc.equipmentList AS eq WHERE eq.name IN (\"Radio\" AND ...

4. Searching by assoication within a collection (HQL)    forum.hibernate.org

Folks, How could I refer to the code of UOMVO in HQL for my example at the bottom? (e.g. vo.quantityAllocations.quantity.UOMVO.code) Code: select vo.code from BinSVO vo where 'Each' in elements(vo.quantityAllocations.quantity.UOMVO.code) net.sf.hibernate.QueryException: expecting 'elements' or 'indices' after: quantity [select vo.code from com.cendec.ikermit.materials.vo.BinSVO vo where 'Each' in elements(vo.quantityAllocations.quantity.UOMVO.code) select vo.code from BinSVO vo where ...

5. HQL - How would you search for a subset of a collection?    forum.hibernate.org

Bah. Forgot to include the mapping documents. The relevant portions are here: Code: ...

6. Searching Collections in Hibernate Proxies    forum.hibernate.org

7. HQL Query... search inside a collection.    forum.hibernate.org

Hello, Isn't it possible to create a query with a condition checking for elements inside a collection ??. (the collection is composed by several objects...). In my mapping... the list is declared this way: Code: ..... ...

8. The search in collection using the compsiteid does not Work    forum.hibernate.org

The search in collection using the compsiteid does not Work Hibernate version: 3.1.3 Mapping documents: Indisponibilidade.xml Indispparte.xml

9. Using Criteria search on last element of collection    forum.hibernate.org

Hi! Is it possible to add a restriction using a Criteria search on the last element of a collection? e.g. I have a Bike and it has multiple prices (Price being a composite -> Price.value, Price.category etc)and I want to restrict my search to the last element of prices. criteria.createAlias("prices","pr").add(Restrictions.eq("pr.category", 2)); Would match any Bike that has a price category of ...





10. One-To-Many collection searching    forum.hibernate.org

I need to find a list of users who have a collection with an object with a property that has a value. Wow, that's a mouthful. Here's a simplification of my domain model: User -> interests (List) -> interests -> relationId I need to find a User who has an interest that has a relationId matching a value I'm inputting. Does ...

11. Searching within a collection - query build problem    forum.hibernate.org

Hi All, I'm new to Hibernate but I've spent a lot of time searching for a best solution for my issue, unfortunatelly I was not able to find one. Excuse me if it is a trivial, but I really need help with it. I have a quite ordinary User object, which apart from simple fields has also a collection (set) of ...