I was wondering if it is possible (and if so, how) to map a property to multiple columns in the database.
For instance, I have a User class with a property called commonName which maps to a column in the users table called "commonname", which contains the first and last name of the user.
But in some implementations, we may want to actually map the User class to a database that does not have a "commonname" column in its users table, but instead has "firstname" and "lastname" as separate columns. Is it possible to map the commonName property to a combination of both these columns? (Some way of mapping it to "firstname" + "lastname")
I suppose that there is really a very easy way to do this, but I am brand new to hibernate and also have limited database experience, so thanks to anyone who can help.
|