Discussion:
[nhusers] Sql query and same column name in two joined tables
adir cohen
2017-08-24 21:02:55 UTC
Permalink
Hi, as the subject stated, my problem is that when i write "select * from person left join animle on preson.animle_id =animle.ID"
Now, if bothe tables have "age" column i have a problem, if i use createSqlQuery(query)
.addentity(person)
.addentity(animle).list()

The animle.age gets the person age :-(.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Loading...