table « Field « JPA Q&A





1. linking to a table with existing field    forum.hibernate.org

Hi, I have a Usr table which has a field for country, it uses ISO code like 'US', 'CA', 'SG', etc. and I also have a country table, the code is same as ISO code, the two tables are independent from each other. usually I'll query the country table if I need to display the name, works fine. but this is ...

2. many-to-many where middle table has extra fields    forum.hibernate.org

3. Redundant field created in table    forum.hibernate.org

Newbie Joined: Sun Sep 25, 2011 4:05 pm Posts: 12 Hibernate is putting an erroneous/redundant field in one of my tables. Here is what I have: Code: @Entity @Table(name="MEASUREMENTS") public class MeasurementsEntity { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id = -1L; @ManyToOne()//fetch=FetchType.EAGER) ...

4. 2 fields FK'd to the same table. Hibernate wont let me.    forum.hibernate.org

Using Hibernate 2.0.3, the following snippet of hbm.xml Code:

5. Adding fields to an associative table    forum.hibernate.org

Is there a way to do the following with hibernate: I have a many-to-many relationship between two classes: A and B. I want to include a new field in their associative table that holds the date that the relation was created. A saw some ways to do that using component mapping in the documentation, but that involves the creation of an ...

6. Additional field in the many-to-many junction table.    forum.hibernate.org

Newbie Joined: Mon May 08, 2006 3:18 pm Posts: 4 Hibernate version: 3.1.3 I'm trying to map a unidirectional many-to-many relationship where the junction table has an additional field that is a condition for the relationship. A simple example is an Adult to Child relationship. Code: _____________ __________________ ...

7. Many-to-one,diff. tables references one field in other table    forum.hibernate.org

I have a problem with 3 tables which reference one field in a 4th table. Only one of the tables references the field. It`s primary key should be written in the fkey field of table 4. The problem is that there is only a null value there. Hibernate version: 3.1.2 Tables: There are 4 Tables: Table1: pkey data1 Table2: pkey data2 ...

8. Handling of Sybase numeric identity fields causes table scan    forum.hibernate.org

We are integrating with a Sybase 12.5.0.3 database having numeric(9,0) identity columns and mapping this into Long-fields in the Hibernate-classes. Things seems to be ok. Changing the database to use other types for these columns is _not_ an option. But - when performing selects on the database, Hibernate/Sybase is unable to use the indexes for the identity-columns, and revert to full ...

9. many-to-many and additional field in the connecting table    forum.hibernate.org

I have no such object ApplicationIllnesses. I thought it was not necessary to have such one but now I've created it. The application mapping file looks like this: ... ... ...





10. get fields from many-to-many middle table and extern tables    forum.hibernate.org

Hibernate version: 3.1.3 Hello forum !! I work about two problems and don't find any solution... I have 4 tables : model modelid modelname model_media modelid mediaid model_mediaweight model_mediaistemplate media mediaid medianame formatid format formatid formatname I have succeed about my first mapping : have a ModelVO and link it with a MediaVO, with ordering by model_mediaweight and model_mediaistemplate. Now the ...

11. truncating data to fit table fields    forum.hibernate.org

Hi, I'm using Hibernate to save data into a database table from a message driven bean that's acting as a log data collector service for the entire organization. Any application can post log data to the queue and this data can be arbitrary. If the data is larger than the the table field, right now I'm getting a "Data truncation: Data ...