When a property is mapped to a secondary table, and that property has a formula, Hibernate assumes that the formula refers to columns in the primary table. It should instead refer to columns in the secondary table.