SCENARIO:
There are 2 classes:
abstract class Abstract
class Sub extends Abstract
where Abstract contains collection of Sub type.
PROBLEM:
There are foreign-key tags missing in Torque schema generated by XDoclet.
EXAMPLE:
/**
* @ojb.class include-inherited="true"
*/
public class Sub extends Abstract
{
}
/**
* @ojb.class include-inherited="true"
*/
public abstract class Abstract
{
/**
* Artificial ID key holder
*
* @ojb.field nullable="false"
* autoincrement="ojb"
* primarykey="true"
*/
private int a_id;
/**
* @ojb.field nullable="false"
* column="CLASS_NAME"
* jdbc-type="VARCHAR"
* length="128"
*/
private String ojbConcreteClass = this.getClass().getName();
/**
* @ojb.collection element-class-ref="test.Sub"
* foreignkey="ab_id"
* remote-foreignkey="su_id"
* indirection-table="ABSTRACT_SUBS"
* auto-retrieve="true"
* auto-update="true"
* auto-delete="true"
*/
private Sub[] a;
}
generated:
...
<table name="ABSTRACT_SUBS">
<column name="ab_id"
type="INTEGER"
/>
<column name="su_id"
type="INTEGER"
/>
</table>
...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]