Hallo,
I've two classes Class A and Class B, both mapped bidirectional. I would like run a query for Class A, which select only certain fields with an appropriate constructor in Class A. But this ends up with an "Unable to locate appropriate constructor on class" Exception.
the query looks like this: select new hibernate.City(city.idCity, city.name, c) from City as city join city.company as c
the constructor in Class A looks like this: public City(int idCity, String cityName, List<Company> company) { this.idCity = idCity; this.name = cityName; this.companies = company; }
|