Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » @OneToOne and @PrimaryKeyJoinColumn do not fetch the object on H2/HSQL database
@OneToOne and @PrimaryKeyJoinColumn do not fetch the object on H2/HSQL database [message #390507] Mon, 20 July 2009 14:14
Philipp Kursawe is currently offline Philipp KursaweFriend
Messages: 135
Registered: July 2009
Senior Member

I have this construct:

class PickOrder {
@OneToOne(optional = false, fetch = FetchType.EAGER)
@PrimaryKeyJoinColumn(name = "auf_nr")
OrderProgress progress;

@Table(name = "order_infos")
public class OrderProgress implements Comparable<OrderProgress> {
@Column(name = "auf_nr", length = 18)
String id;

float done_percent;
float shortfalls_percent;
int shortfalls;

public OrderProgress() {

public String toString() {
String value = this.done_percent + "%"; //$NON-NLS-1$
if (this.shortfalls_percent > 0.f) {
value += " [" + this.shortfalls_percent + "%]"; //$NON-NLS-1$
return value;

public int compareTo(final OrderProgress o) {
float result = this.done_percent - o.done_percent;
if (result == 0.f) {
result = this.shortfalls_percent - o.shortfalls_percent;
return (int) result;

When calling "select o from PickOrder" the progress object is never
filled with the data from the table (which is a view actually).
When I call "select o from PickOrder where" it is sometimes
fetched sometimes not. The generated SQL is correct. Any Ideas what
might cause such a behaviour on H2 (HSQL)?

Previous Topic:Create additional views on session start
Next Topic:problem with DB2 database - DB2 urgent
Goto Forum:

Current Time: Wed Apr 01 12:32:01 GMT 2020

Powered by FUDForum. Page generated in 0.03074 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top