Say I have a class with a name Personthat is usually stored in a db table using ORMLite.
Now I have a member inside this class Personcalled House. The class Housecontains 3 properties and NEVER is stored in the database.
I want that whenever it is Personsaved, I want to save 3 fields Housein a table Personin 3 different columns.
So, Person table will have: { person_name, person_contact, house_address, house_type, house_date }.
The last 3 fields will come from the object House.
I think I should use DataPersisterfor a member variable House, but does this mean that it will write the entire object Houseto the ONE column? I want to split it into 3 columns inside a table Person. Can anyone help?
Thank!
source
share