db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brieuc Desoutter <brie...@gmail.com>
Subject Bug : Derby table invisible from JPA provider
Date Sat, 01 Aug 2009 16:31:45 GMT
Hi,

I'm learning JPA from the book Pro EJB 3 : Java Persistence API.

For the following mapping from chapter 4 :
  Employee (*) <------> (0..1) Department

I have the following annotation :

@Entity
@Table( name="emp", schema="APP" )
public class Employee {

	@ManyToOne
	@JoinColumn( name="dept_id" )
	private Department department;

	[...]
}

@Entity
@Table( name="dept", schema="APP" )
public class Department {

	@OneToMany( mappedBy="department" )
	private Collection<Employee> employees;

	[...]
}

Tables are created before-hand with an sql script executed from ij as  
shown in the derby_db_creation.txt file attached.

Mime
View raw message