Java + Hibernate: Using a Formula on an embedded class <p>Can I use the <code>@Formula</code> annotation on an embedded class which maps the resultset of the query in the formula?</p> <p><strong>Entity</strong></p> <pre><code>@Entity(name = "TABLE") public class SpecialEntity { ... @Embedded @Formula("SELECT PATH, SIZE FROM TABLE WHERE ID = ID') private List&lt;EmbedProperties&gt; properties; } </code></pre> <p><strong>Embeddable</strong></p> <pre><code>@Embeddable public class EmbedProperties { @Column("PATH") private String id; @Column("SIZE) private Long size; } </code></pre> <p>If not, what are the alternatives?</p>