I have a hibernate mapping class that maps an existing java class (say A) to a table. One of the attributes of the java class is another java class (say AA )that is mapped using the component attribute in the hibernate mapping file. There is only one attribute in class AA, which is mapped to a property from the table. I would like to know what happens when that property is empty in the table. Would an instance of class AA be created and in the final object of class A when the mapping is being executed? In my code I am seeing that the instance is not created and that attribute of Class A remains null. Is there a way to specify a parameter in the hibernate mapping file to instantiate the object nevertheless(even if its mapping property is empty in the table).
I am using Java 1.6 and hibernate 3
Thanks.