Hi!
I have two legacy tables (created via script and not using hdbtable or hdbdd files). I defined them using $defineEntity of XSDS and I want to create an association between them.
After lots erros I could managed like below.
XSDS.$defineEntity("tab1", "\"SM\".\"TAB1\"", {
FK1: {
$association: {
$entity: "tab2", // already defined in XSDS
$on: "$SOURCE . \"FK1\" = $SOURCE.\"FK1 FK1\" "
}
}
}, {
$entityName: "tab1",
$schemaName: "SM"
});
I know my $on condition looks very wierd... but it it worked somehow.
With the help of $sql method I could see that the generated query was using a LEFT OUTER JOIN.
So, I want to change the Join condition. Documentation has no information about that and the example of using Unmanaged Condition below is very limited.
$on: join-cond
There is a $SOURCE tag but not $TARGET..
In summary:
- how to write the $on condition properly
- how to change the join type to Inner join for example?
Thanks!