value « Collection « JPA Q&A





1. Hibernate criteria on collection values    stackoverflow.com

I solved this myself and provided an answer below. I'm trying to put together a complicated query using Hibernate. I've been leaning toward Criteria, but I'm beginning to suspect it's not possible, ...

2. Collections of lookup values    forum.hibernate.org

I have read the documentation on Collections and Parent Child Relationships numerous times and I am still unclear on a couple things (possibly because I don't want to do things the way I suspect I am supposed to...). I have a table of valid values as follows (used for "enforcing" business rules and/when generating SELECT tags in the view of a ...

3. Collection with multiple value type    forum.hibernate.org

4. Using a collection value in a WHERE condition    forum.hibernate.org

Hi, i have some persistent objects which contains a set of Long values: The mapping between user and task is non-relational (task contains a list of concerned user ids but there's no constraint that forces the ...

5. collection of values    forum.hibernate.org

Hi, I am quite new to Hibernate and over the last few days I hit a road block (with Hibernate2.1.7). I want to have an entity with a collection of values. I then want to use the Session.filter() method to retrieve a subset of that collection of values. But I can't even get the most trivial cases to work. :-( The ...

6. Support for Criteria's on collections of value types    forum.hibernate.org

In this post to the Hibernate forum, Gavin stated that there's no support for collections of value types in the Criteria API right now: http://forum.hibernate.org/viewtopic.php?t=931999 As almost 2 years have passed by by now, this limitation still seems to be valid. Imagine the following mapping scenario: Code:

7. Dereference values from collection    forum.hibernate.org

Hi I've a one-to-many relationship Order and the OrderItems contained in the Order. The Order class contains a Set with OrderItems. When I update the Order I want to dereference OrderItems which has been removed. An extract of the configuration file is shown below. When I in code try to make the ...

8. Indexes for value collections    forum.hibernate.org

Hello, Let's take the following example: An Order class has a set of OrderItems, and each OrderItem also references (many-to-one) a Product. So the schema will contain (say) TBL_ORDERITEM with OrderId and ProductId columns, each of which are foreign keys. The collection mapping in Order.hbm.xml looks like: Code: ...

9. Comparing Collections against values    forum.hibernate.org

[b]Hibernate version:3.0.2 [b]Name and version of the database you are using:Oracle [b]The generated SQL (show_sql=true):true [b]Debug level Hibernate log excerpt:no I'm unable to do a select query where the id should be in a array or String? For example Select emp.id from Employee emp where emp.firstname = "My string array"; The String array will be containing all the possilbe names of ...





10. Returning values of collection    forum.hibernate.org

tx, I've tried that and it works; however, I'm not thrilled by the fact that I have to create a class Label with simply a property Label but I can live with it. Could you help me out with 2 related questions? 1. return getHibernateTemplate().find("from Label"); Do you also know how I can get a distinct list of labels? 2. Actualy ...