Hello All,
This a sort of a 'pre-sales' question. I am not using hibernate yet but am certainly considering it.
My Postgres db schema set-up is quite unique: for example, instead of having one table for user object i have 2 tables:
tb_user {
uid pk
app_id
name
email
}
tb_user_property {
uprop_id pk
uid fk
prop_name
prop_value
}
so, basically user will have just the most essential metadata for the user and the rest of user data is stored as properties (this is to enable using teh same db schema by multiple applications i am developing).
then i have a java object (User) which looks similar to this:
public class User {
int uid
int appid
String name
String email
List properties
}
now the question is: will i be able to utilize hibernate to perform CRUD operations on such db structure? (i. e. my finders should be able to collect user data from the two tables joined; the create should store data in the two tables, etc.). will the solution be elegant or more of a hack? Any pointers to some relevant reading material?
If my question is not entirely clear, please ask for clarification. I really appreciate your help.
James
|