I'm novice in hibernate and i have a little problem with mapping.
I have three tables:
CREATE TABLE USER (
ID NUMBER NOT NULL,
LOGIN VARCHAR2(20) NOT NULL,
PASSWORD VARCHAR2(128) NOT NULL,
FULLNAME VARCHAR2(128) NULL,
);
CREATE TABLE PROFILE (
ID NUMBER NOT NULL,
PROFILE_NAME VARCHAR2(64) NULL
);
CREATE TABLE USER_PROFILE (
USER_ID NUMBER NOT NULL,
PROFILE_ID NUMBER NOT NULL
);
I need to use three tables, because one user may have few profiles, and one profile may have few users.
I want to map this three tables on two classes. Can i do this or i have to use three classes.
|