Hi,
I would have a simple many-to-one mapping from Value to Measurement.
But I think it does not make sense to have a set of Values
in my Measurement class, because there are many (>10.000) and I
will only retrieve them via queries.
(Compare to Customer Cargo example in Domain-driven-design).
How should the hbm files look like?
How do I save a measurement through hibernate?
How do I specify with XDoclet/Hibernate that the values table contains a
foreign key to measurements table? My whole application relies on shemaexport,
so I would like to create also the values table automatically with the rest.
Using Hibernate 2.1
For clarification measurement should look like
public class Measurement{
String name;
}
_not_ like:
public class Measurement{
String name:
Set values;
}
Thanks for your answers
robert
|