I try to use @JoinColumnsOrFormulas but
Code:
@ManyToOne
@JoinColumnsOrFormulas({ @JoinColumnOrFormula(formula = @JoinFormula(value = "cast (t as bigint)", referencedColumnName = "id")) })
@Fetch(FetchMode.JOIN)
private T t;
But i have an error on SQL Syntax
I try this
Code:
@ManyToOne
@JoinColumnsOrFormulas({ @JoinColumnOrFormula(formula = @JoinFormula(value = "cast (id as varchar(255))", referencedColumnName = "tid")) })
@Fetch(FetchMode.JOIN)
private T t;
but i have this error
Quote:
referencedColumnNames(tid) of com.test.M.t referencing com.test.T not mapped to a single property
Someone can help me please.