Hibernate schema validation does not consider table ALIASes in DB2; these aliases are equivalent to SYNONYMs in Oracle. In fact, in DB2, “SYNONYM is a synonym for ALIAS”. Unfortunately, ENABLE_SYNONYMS has no effect with relation to DB2 ALIASes.
Support for Oracle synonyms was added in the following ticket. This ticket would require a very similar change.
That is great news, thank you! Will it be an issue getting this backported to 5.6?
Andrea Boriero October 7, 2022 at 5:04 PM
Hi ,
thanks for you PR but I had already created a PR for this issue
David Loewy October 7, 2022 at 4:24 PM
Thank you for picking this up Andrea! I was planning to submit a PR (see draft attached) – the code fix is straightforward, but I haven’t figured out Hibernate’s vendor-specific test framework quite yet. Is this something you can take on, or should I plan do the work myself if I want a chance of getting it merged?
Regarding backports, my organization is stuck on 5.6 for a while longer. Will you be able to backport to that version?
Hibernate schema validation does not consider table ALIASes in DB2; these aliases are equivalent to SYNONYMs in Oracle. In fact, in DB2, “SYNONYM is a synonym for ALIAS”. Unfortunately,
ENABLE_SYNONYMS
has no effect with relation to DB2 ALIASes.Support for Oracle synonyms was added in the following ticket. This ticket would require a very similar change.
Mention of lack of support in DB2 docs: