dcsimg
@JoinTable or @JoinCol...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Dupond
Posted On:   Monday, November 6, 2006 03:25 PM

Hello. as I still did not solve my problem, I will try to reformulate my question I want to make request EJB3 QL with joint. here my tables: CREATE TABLE `umlssnmi` ( `AUIS` varchar(20) NOT NULL default '', `CUI` varchar(20) NOT NULL default '', `CODE` varchar(20) NOT NULL default '', `TTY` varchar(5) NOT NULL default '', `STR` varchar(255) NOT NULL default '', `HIER` varchar(255) NOT NULL default '', `PROF` tinyint(2) NOT NULL default '0', `AXE` char(1) NOT NULL default 'D', PRIMARY KEY (`AUIS`), KEY `CODE` (`CODE`), KEY `TTY` (`TTY`), KEY `CUI` (`CUI`), KEY `AXE` (`AXE`) ) TYPE=MyISAM; CREA   More>>

Hello. as I still did not solve my problem, I will try to reformulate my question I want to make request EJB3 QL

with joint.
here my tables:


CREATE TABLE `umlssnmi` (
`AUIS` varchar(20) NOT NULL default '',
`CUI` varchar(20) NOT NULL default '',
`CODE` varchar(20) NOT NULL default '',
`TTY` varchar(5) NOT NULL default '',
`STR` varchar(255) NOT NULL default '',
`HIER` varchar(255) NOT NULL default '',
`PROF` tinyint(2) NOT NULL default '0',
`AXE` char(1) NOT NULL default 'D',
PRIMARY KEY (`AUIS`),
KEY `CODE` (`CODE`),
KEY `TTY` (`TTY`),
KEY `CUI` (`CUI`),
KEY `AXE` (`AXE`)
) TYPE=MyISAM;


CREATE TABLE `whoart` (
`AUIW` varchar(10) NOT NULL default '',
`CODE` varchar(10) NOT NULL default '',
`STR` varchar(255) NOT NULL default '',
`FSTR` varchar(255) NOT NULL default '',
`SOC` varchar(5) NOT NULL default '',
`SEMTYPE` varchar(5) NOT NULL default '',
`SRC` enum('WA','CIM') NOT NULL default 'WA',
PRIMARY KEY (`AUIW`),
KEY `SOC` (`SOC`),
KEY `CODE` (`CODE`)
) TYPE=MyISAM;


Knowing that I have the following table which has like clès primary both clès primary of the tables the preceding one.


CREATE TABLE `wasnmi` (
`AUIW` varchar(20) NOT NULL default '',
`AUIS` varchar(20) NOT NULL default '',
`MODIF` varchar(10) default NULL,
`SRC` enum('S','MW','MS','MA') NOT NULL default 'S',
PRIMARY KEY (`AUIW`,`AUIS`),
KEY `MOD` (`SRC`),
KEY `MODIF` (`MODIF`)
) TYPE=MyISAM;


knowing that cardinality between these tables and ManyToMany, my question and to know if so that I can make a join

between my tables I must create tables intermédiates which contain that the primary keys like umlssnmi_wasnmi kind

and whoart_wasnmi for example, and to make @JoinTable; or the table "wasnmi" will join the tables.

I thank you in advance    <<Less
About | Sitemap | Contact