collection « Component « JPA Q&A





1. Collection of components    forum.hibernate.org

Hi Friends, I was reading the section "Collections of components" in chapter 6 "Mapping collection and entity associations" of the book "Java Persistence with Hibernate" by Gavin King and Christian Bauer. I had a query in this section. This section says "You could map image as an entity class and create a one-to-many relationship from Item to Image. However this isn't ...

2. Collection of components    forum.hibernate.org

Hi Friends, I was reading the section "Collections of components" in chapter 6 "Mapping collection and entity associations" of the book "Java Persistence with Hibernate" by Gavin King and Christian Bauer. I had a query in this section. This section says "You could map image as an entity class and create a one-to-many relationship from Item to Image. However this isn't ...

3. Multiple component collection mapping    forum.hibernate.org

Greetings all. I am currently stumped by mapping problem for our domain model.. /** * @hibernate.class table="LISTING_ITEM" */ class ListingItem extends Componet{ /** * @hibernate.component class="Content" * / Content title; /** * @hibernate.component class="Content" * / Content content; } class Content { /** * @hibernate.map name="localizedContent" cascade="all" * @hibernate.collection-index column="locale" * @hibernate.collection-key column="FK_parent" * @hibernate.collection-one-to-many class="LocalizedContent" */ Map localizedContent; } /** ...

4. Deleteing a component from a collection.    forum.hibernate.org

Hibernate version: 2.1.4 Mapping documents:

10. Collections of components of ...    forum.hibernate.org

Hello, I'm trying to map a list of parameter sets for an application. Because we want to transfer them via WebServices, I defined them in a XSD. Code: ... ...

11. Collections of components    forum.hibernate.org

Hello Newbie. Suppose I have a PhotoAlbum class that contains a Set of Photos. The Photos collection is mapped as a component. Ultimately this is backed by a "Photos" table containing Id, Photoname and Location fields. Suppose there is an Order class that also comprises a Set of Photos. Note that the Order and PhotoAlbum classes are unrelated for this exercise. ...

12. HSQL / component / Restrictions.in(String, Collection)    forum.hibernate.org

Hi, I am testing the Criteria API in both PostgreSQL and HSQL. One of the tests pretends to get all the companies having some addresses. My query looks like this: Code: public Set getOrganizationsByPostalAddress(Set postalAddresses) { final HashSet lResult = new HashSet(); if (!postalAddresses.isEmpty()) { List list = session.createCriteria(HibernateOrganization.class).add(Restrictions.in(HibernateOrganization.POSTALADDRESS, ...

13. Collection Map of components    forum.hibernate.org

Hibernate version: 3.2.5 GA / JDK 1.4.2 Mapping documents: see below Code between sessionFactory.openSession() and session.close(): n/a Full stack trace of any exception that occurs: none Name and version of the database you are using: Oracle 10g The generated SQL (show_sql=true): see below Debug level Hibernate log excerpt: see below I am trying to map a Map collection to a component. ...