I'm not sure to understand exactly how components mappings work with hql:
I had a hql query like
Quote:
"select cp.codePays from CategoriePort cp where cp.pays = :pays"
cp.pays is here a component Pays with one simple String field.
and I tried
Code:
queryObject.setParameter("pays", otherPays);
where otherPays is another object of type Pays.
To get that working I had to do:
Code:
queryObject.setString("pays", otherPays.getPays());
By looking at the debug logs, the strange thing here is that hibernate serializes the object for parameter in the query (which of course fails)... Why isn't hibernate using the component info in the query?
Henri.