Sorry, I am pretty new to Hibernate/JPA!
I have created an embedded object 'Address' which has 'addr1' and 'addr2' fields. In most Entities/tables, both columns/fields are defined. But I also have a few tables that only define one address field ('addr1').
Is there a way to override the mapping/definition to not use the 'addr2' field in the embedded object? I have looked and couldn't find anything. Since the class is "tagged" as an embedded object, the 'addr2' field that is not on the table causes an error (in Eclipse - gives an error that column does not exist on table).
Any help would be great!
Thanks
|