idbag

2 views
Skip to first unread message

FriedDust

unread,
Dec 14, 2009, 11:29:06 PM12/14/09
to jmatter
Hello Eitan,

I'm trying to use idbag instead of bag for composite relation list. I
modified your HBMMaker's produceBag to
String listType = (field.isComposite()) ? "idbag" : "bag"; (the line
which you had commented out).
@Entity
public class Hero extends AbstractComplexEObject {

private final StringEO name = new StringEO();

private final CompositeList zeroes = new CompositeList(Zero.class,
this);
public static final Class zeroesType = Zero.class;

public StringEO getName() {
return name;
}

public CompositeList getZeroes() {
return zeroes;
}

@Override
public Title title() {
return name.title();
}

}

public class Zero extends AbstractComplexEObject {
private final StringEO f1 = new StringEO();
private final StringEO f2 = new StringEO();

public StringEO getF1() {
return f1;
}

public StringEO getF2() {
return f2;
}

@Override
public Title title() {
return f1.title();
}
}
When I try to save the hero object, an exception is thrown -
IdentifierGeneratorFactory cannot cast to long.

-FriedDust
Reply all
Reply to author
Forward
0 new messages