entity « Component « JPA Q&A





1. Can an NHiberate entity have a natural-id in a component?    stackoverflow.com

It seems impossible to me to have a natural-id in a component.

public class User
{
    private IAccount account;
    public User(string name, string password){
    ...

2. Envers fails when an entity has dynamic-component    forum.hibernate.org

hi, Am working with hibernate version 3.6.0.Final. Envers fails during initialization when an entity has dynamic-component. Hibernate.cfg.xml - com.mysql.jdbc.Driver jdbc:mysql://localhost/company?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8 root root 1 org.hibernate.dialect.MySQLInnoDBDialect thread ...

3. entities before components    forum.hibernate.org

Newbie Joined: Thu Feb 12, 2004 2:04 pm Posts: 8 here is the documentation of the problem I'm having. I'll try to explain it again. I have an existing database that I'm trying to use hibernate on top of. So I have a schema I'm stuck with. Here is the log output: 16:25:59,492 DEBUG JTATransaction:50 - commit 16:25:59,492 DEBUG SessionImpl:2193 - ...

4. component vs entity mapping    forum.hibernate.org

Given the following tables and no possibility of changing them CREATE TABLE CAR ( ID NUMBER (10), NAME VARCHAR (50) NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE PART ( CAR_ID NUMBER (10), SEQUENCE NUMBER(3), NAME VARCHAR (50), PRIMARY KEY (CAR_ID, SEQUENCE), FOREIGN KEY (CAR_ID) REFERENCES CAR(ID) ); What is the most effective mapping? I want value semantics on PART (i.e. ...

5. Embedable component needs access to owning entity    forum.hibernate.org

The element allows a subelement that maps a property of the component class as a reference back to the containing entity.