list « Composite « JPA Q&A





1. HQL: How to sort list of objects on property of mapped composite element    stackoverflow.com

I have an object with a map of components:

<class name="Article" table="articles">
 ...
  <map name="i18nData" table="articles_i18n">
      <key column="id" not-null="true"/>
      <map-key column="language" ...

2. Persisting a list of elements with composite keys    stackoverflow.com

I'm using java persistence to save a list of entities that are associated to another entity. Here's a quick rundown of where I'm having some problems.

@Entity public class Offer implements ...

3. JPA persist list of objects of table with Composite primary key    stackoverflow.com

I need to save a list of objects of a table with composite primary key, I am doing as shown below. But I am getting an error Caused by: java.sql.BatchUpdateException: ORA-00001: ...

4. JPA entity composite index collection    stackoverflow.com

I am using JPA + hibernate in my project. I have to retrieve data from an already existing database, and cannot make modifications on it. The schema is like, there are ...

5. List index part of composite key?    forum.hibernate.org

I have a bidirectional one-to-many between composite keys (legacy schema) that looks something like OrderKey(customer, orderNumber) OrderRowKey(customer, orderNumber, rowNumber) I would think this is pretty common. Is it possible to map the rowNumber as an index column? I know modifying primary keys is not that cool but it would be handy to be able to remove and sort order rows and ...

6. unidirection many-many composite key with a list-index    forum.hibernate.org

I am trying to model a many-many to relationship with a composite key and list index. I almost have this working but I can not seem to get/set list index property. It works as long as I do not set the list-index property. I get the following error: javax.naming.NamingException: Repeated column in mapping for com.loadgeneral.model.Scenario.scenarioModules column: LIST_POSITION How else I am ...

7. Using Composite id only first data is show from list    forum.hibernate.org

Newbie Joined: Wed Dec 17, 2003 11:55 am Posts: 10 Following are the xml and .java files for composite id I have tested the sql query generated by hibernate. It shows correct result. But when i am retrieved this data by session.find It is storing only the first record in the list even though there are many records. I have also ...

8.  of composite-elements    forum.hibernate.org

Hibernate version:2.1.6 If I have a collection (in this case a List) of components, that I have mapped as follows: Do I have to write (and register) a mapping file for class "foo"? If so, what parameters do I use for the mapping tag in foo.hbm.xml? If ...

9. How to Map List of String within a     forum.hibernate.org

... ... ...





10. Can't map child List w/ composite ID    forum.hibernate.org

I've got a parent/child relationship where both tables/classes have a composite ID. Both of the objects can be queried individually w/o error but I have problems when I try to create the parent/child relationship in the mapping. I am getting this exception message: Code: 11:25:50,154 INFO Configuration:468 - Reading mappings from resource: PactsSalesHeader.hbm.xml 11:25:50,184 ERROR XMLHelper:61 - Error parsing XML: ...

11. composite key class in a list    forum.hibernate.org

hi, i have searched a while for this but i still cant seem to grasp of how to get a list of objects which have a composite key defined. I am working with good ole legacy(cannot modify db) and I need a way to manually assign the keys from the parent class. I have the following working which gives me only ...

12. How to get a list when using composite-id and a list of id's    forum.hibernate.org

I am using Hibernate version:3.1.3 with Mysql 4.1.11 and my test classes are using: hsqldb 1.8.0.1 I try to get a list of Data (abstract superclass of BinaryData and XMLData) using the following code: Code: public List get(List dataIdentifiers) throws DaoException { List dataList = new ArrayList(); ...

13. How to map composite-id to the key of list ?    forum.hibernate.org

14. Criteria : disjunction on list of object with composite-id    forum.hibernate.org

Newbie Joined: Mon Nov 06, 2006 5:45 am Posts: 5 Hibernate version: 3.13 Hello, i want create a disjunction on a criteria which create a joint on object which is composed of a composite-id and containig in a list...(see Cisp_Concept_RelationConcep mapping)... for a simple object used in a one-to-many association it's ok, but for this object it's KO... Mapping documents: Concept.hbm.xml ...

15. Problem with composite-key and list-index    forum.hibernate.org

Hello, I've got a problem using a one-to-many relationship modeled in an array fashion, with the key on the child entity represented by a composition of the foreign key to the parent record plus the index column. At save time Hibernate tells me that I have to assign the key manually, but I was expecting Hibernate to build the right key ...

16. Composite id and list index solution    forum.hibernate.org

Hi, see the following code Code: @Entity public class Team { @Id @GeneratedValue(GenerationType.AUTO) @Column(name="TEAM_ID") private Integer id; // One way relationship @OneToMany(cascade=CascadeType.PERSIST) @JoinColumn(name="TEAM_ID", nullable=false) @IndexColumn(name="PLAYER_INDEX", nullable=false) ...