lutz behnke
2003-06-20 10:05:52 UTC
Hi there,
I am new to middlegen and am trying to create CMP code for the following
tables:
tablea (
identifier int primary key,
name varchar
)
tableb (
BaseEntryID int primary key references tablea(identifier),
label varchar
)
tablec (
BaseEntryID int primary key references tablea(identifier),
value int
)
Now each entry in tablea corresponds with ab entry either in tableb or
tablec. But I do not see how to do this. Unfortunately middlegen
includes calls to setTableb _and_ setTablec calls into the code for
TableaBean. These can obviously not be set, as the relationship is 0..1 one
My build.xml looks like this:
<table name="tablea" generate="true">
<crossref fktable="tableb" fkcolumn="BaseEntryID"/>
<crossref fktable="tablec" fkcolumn="BaseEntryID"/>
</table>
<table name="tableb" generate="true" />
<table name="tablec" generate="true" />
Question I: How do I create 0..1 relationships?
Question II: where can I find documentation for the *-prefs.properties
file?
I use middlegen from CVS, Xdoclet-1.2b3-bin, java-1.4x, ant 1.5
TIA
mfg lutz
I am new to middlegen and am trying to create CMP code for the following
tables:
tablea (
identifier int primary key,
name varchar
)
tableb (
BaseEntryID int primary key references tablea(identifier),
label varchar
)
tablec (
BaseEntryID int primary key references tablea(identifier),
value int
)
Now each entry in tablea corresponds with ab entry either in tableb or
tablec. But I do not see how to do this. Unfortunately middlegen
includes calls to setTableb _and_ setTablec calls into the code for
TableaBean. These can obviously not be set, as the relationship is 0..1 one
My build.xml looks like this:
<table name="tablea" generate="true">
<crossref fktable="tableb" fkcolumn="BaseEntryID"/>
<crossref fktable="tablec" fkcolumn="BaseEntryID"/>
</table>
<table name="tableb" generate="true" />
<table name="tablec" generate="true" />
Question I: How do I create 0..1 relationships?
Question II: where can I find documentation for the *-prefs.properties
file?
I use middlegen from CVS, Xdoclet-1.2b3-bin, java-1.4x, ant 1.5
TIA
mfg lutz
--
Lutz Behnke
Hochschule fuer Angewandte Wissenschaften Hamburg
- University of Applied Sciences -
Fachbereich E/I, Softwarelabor, Berliner Tor 7, 20099 Hamburg, Germany
phone: +49 40 42875-8156 mailto:***@informatik.haw-hamburg.de
fax : +49 40 2803770 http://swl.informatik.haw-hamburg.de/~sage
Lutz Behnke
Hochschule fuer Angewandte Wissenschaften Hamburg
- University of Applied Sciences -
Fachbereich E/I, Softwarelabor, Berliner Tor 7, 20099 Hamburg, Germany
phone: +49 40 42875-8156 mailto:***@informatik.haw-hamburg.de
fax : +49 40 2803770 http://swl.informatik.haw-hamburg.de/~sage