I am trying to access a join column (the join is performed using @SecondaryTables annotation) in the @Formula annoation.
I have something like this
Now when I look at the query generated by hibernate, I see that he does not use the alias it made for sectable1 to get some_other_column in the @Formula, but it uses the alias it made for primary_table.
How can I fix this? I came across @JoinColumnsOrFormulas I am not really sure if it's relevant to my problem, but regardless I have seen that is available only since 3.5.1, and unfortunately we are using Hibernate 3.2 (don't ask), and upgrading at this time would be quite a problem. So is there any other way?