SmartClient Version: SNAPSHOT_v12.1d_2019-07-20/Enterprise Deployment (built 2019-07-20)
Hello, I've just realized that in case of multiple indirection, the table alias is generated like this (from the docs):
Actually I was convinced that the framework would use the concatenation of the relatedTableAlias attributes for the foreignKeys involved.
I found this a bit counter-intuitive.
Also, with oracle database, when the alias is longer than 30 characters, it requires to shorten the fields name, instead of shortening the relatedTableAlias, which to me seems better for readability.
Moreover, now the alias is composed from the concatenation of two field names + a related table alias, so will probably be longer than the concatenation of two relatedTableAlias.
May I ask if it's actually intended behaviour?
Hello, I've just realized that in case of multiple indirection, the table alias is generated like this (from the docs):
Code:
It is also allowed to specify a series of FK fields in includeVia, for example "moneyTransferDetail" could declare: <field name="mainSourceCurrencyGroup" includeFrom="moneyTransfer.currency.currencyGroup.groupName" includeVia="mtId.sourceCurId"/> <field name="mainPaymentCurrencyGroup" includeFrom="moneyTransfer.currency.currencyGroup.groupName" includeVia="mtId.paymentCurId"/> In this case the prefix used for table aliases will be the includeVia value with "_" substituted for ".", so the table aliases will be "mtId_sourceCurId_group" and "mtId_paymentCurId_group".
I found this a bit counter-intuitive.
Also, with oracle database, when the alias is longer than 30 characters, it requires to shorten the fields name, instead of shortening the relatedTableAlias, which to me seems better for readability.
Moreover, now the alias is composed from the concatenation of two field names + a related table alias, so will probably be longer than the concatenation of two relatedTableAlias.
May I ask if it's actually intended behaviour?
Comment