Hibernate version: 3.2.5.ga
Mapping documents: NA
Code between sessionFactory.openSession() and session.close(): NA
Full stack trace of any exception that occurs: NA
Name and version of the database you are using: NA
The generated SQL (show_sql=true): NA
Debug level Hibernate log excerpt: NA
I have a mapping question. I have a pojo that that contains a list of pojo(s). However the catch is that the pojo in the list of is wraped by another class. The class structure is as follows:
Code:
class ShoppingCart
{
List<FoodHolder> getFoods();
...
}
class FoodHolder
{
Type getFoodType();
Food getFood();
...
}
abstract class Food
{
...
}
class Candy extends Food
{
...
}
class Fruit extends Food
{
...
}
Can Hibernate populate a list of FoodHolder(s), which wraps a Food, instead of a list of Food?