| Author |
Message |
|
|
Post subject:
Posted: Feb 06, 2006 - 01:37 AM
|
|
Moderator


Joined: May 05, 2003
Posts: 1037
|
|
| Quote: | | Bump. Any chance of a quick fix before the end of the month? |
The next release will enable MyEclipse Hibernate tools and Jboss HT to coexists. We are evaluating a plan to accelerate 4.1.1 but there are a number of other features that are planned for this release that must be accounted for. So at the moment the answer is we are pushing for an end of Feb 4.1.1 release. |
_________________ Michael
MyEclipse Support
Posting Guidelines FYI
When posting a bug report, click the "Insert" button above the message window and fill out the empty fields to help us troubleshoot your problem.
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 06, 2006 - 02:09 AM
|
|
Moderator


Joined: Feb 03, 2006
Posts: 1117
|
|
Oberinspector,
can you send me schema with master table and foreign key table with missing foreign key ? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 06, 2006 - 08:14 AM
|
|
Registered Member


Joined: Jan 06, 2006
Posts: 4
|
|
since the reverse engineereng seems not to work as i expected. i spend not to much time analysing the problem... some of the many-to-one mappings were missing some don't. probably i have made a mistake, but i fall backt to an eclipse with hibernate tools enabled and everything was as i expected.
In my schema i have a base Entity table with some helper tables (EntityI18N, Entry, EntryI18N, History, Authorisations, Icon...) which is the parent for most of the other tables. Since inheritance mapping is not supported by hibernates reverse engineering (would also be very nice to have!), i converted the reverse engineered hbm.xml of the child classes with xslt to the joined-subclass mapping.
as i remeber one of the problems, the myeclipse reverse engineering did not include the relations to the transfer table in the account table mapping... If i have more time i could repeat the reverse engineering, but at the moment it's no blocking point for me...
I think the problem is related to the diffrent dialects of the mysql myisam and mysql innodb. Especialy the foreign keys were the reason to move to the mysql innodb.
thank you for your help!
My schema used on a mysql innodb:
| Code: |
#========================================================================== #
# Tables #
#========================================================================== #
CREATE TABLE Article (
id BIGINT NOT NULL,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Path (
id BIGINT NOT NULL,
GPX TEXT,
pathLength FLOAT,
pathCharacter INTEGER,
minlat DECIMAL,
minlon DECIMAL,
maxlat DECIMAL,
maxlon DECIMAL,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Category (
id BIGINT NOT NULL,
CONSTRAINT PK_Category PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Person (
id BIGINT NOT NULL,
nickname VARCHAR(40),
email VARCHAR(80) NOT NULL,
passwd VARCHAR(30) NOT NULL,
forename VARCHAR(40),
surename VARCHAR(40),
lang VARCHAR(10),
sex ENUM('male','female'),
birthday DATE,
CONSTRAINT PK_person PRIMARY KEY (id),
UNIQUE UC_Person_nickname (nickname),
UNIQUE UC_Person_email (email)
)
Type=InnoDB;
CREATE TABLE Usergroup (
id BIGINT NOT NULL,
groupname VARCHAR(40),
CONSTRAINT PK_Usergroup PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Task (
id BIGINT NOT NULL,
tasktype TINYINT,
expiryDate DATE NOT NULL,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Vote (
idVote BIGINT NOT NULL AUTO_INCREMENT,
idVoter BIGINT NOT NULL,
idFingerprint BIGINT,
idRating BIGINT,
ratingvalue TINYINT NOT NULL,
ratingtimestamp TIMESTAMP NOT NULL,
PRIMARY KEY (idVote),
UNIQUE UN_Evaluation_1 (idVoter)
)
Type=InnoDB;
CREATE TABLE Roles (
id BIGINT NOT NULL,
rights BIGINT DEFAULT 0,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Point (
id BIGINT NOT NULL,
pointCharacter SMALLINT,
lat DECIMAL,
lon DECIMAL,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Area (
id BIGINT NOT NULL,
GPX TEXT,
areaSize FLOAT,
areaCharacter INTEGER,
minlat DECIMAL,
minlon DECIMAL,
maxlat DECIMAL,
maxlon DECIMAL,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Pixelmap (
id BIGINT NOT NULL,
mapType SMALLINT,
mapURL VARCHAR(200),
minlat DECIMAL,
minlon DECIMAL,
maxlat DECIMAL,
maxlon DECIMAL,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Query (
id BIGINT NOT NULL,
queryString TEXT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Image (
id BIGINT NOT NULL,
height SMALLINT,
whidth SMALLINT,
imageURL VARCHAR(200),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Container (
id BIGINT NOT NULL,
idEntity BIGINT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Entry (
idEntry BIGINT NOT NULL AUTO_INCREMENT,
idEntity BIGINT NOT NULL,
idNode BIGINT,
OrderNr SMALLINT,
flags BIGINT,
number INTEGER,
creationtime TIMESTAMP,
PRIMARY KEY (idEntry)
)
Type=InnoDB;
CREATE TABLE Date_Time (
id BIGINT NOT NULL,
Days TINYINT,
StartTime TIME,
StopTime TIME,
StartDate DATE,
StopDate DATE,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Account (
id BIGINT NOT NULL,
account FLOAT(0,2),
currency VARCHAR(3),
owner_name VARCHAR(40),
account_number VARCHAR(10),
bank_code VARCHAR(8),
bank VARCHAR(40),
iban VARCHAR(36),
bic_swift_code VARCHAR(11),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Trace (
id BIGINT NOT NULL,
logintime TIMESTAMP,
logofftime TIMESTAMP,
staticFp VARCHAR(200),
dynamicFp VARCHAR(200),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Grid (
idGrid BIGINT NOT NULL AUTO_INCREMENT,
Grid INTEGER NOT NULL,
idEntity BIGINT NOT NULL,
geolevel TINYINT,
lat DECIMAL,
lon DECIMAL,
PRIMARY KEY (idGrid),
UNIQUE UN_Grid_1 (Grid, idEntity)
)
Type=InnoDB;
CREATE TABLE Entity (
id BIGINT NOT NULL AUTO_INCREMENT,
idOwner BIGINT,
ownerAccess TINYINT,
publicAccess TINYINT,
flags INTEGER,
creationdate TIMESTAMP,
lastchange TIMESTAMP,
version SMALLINT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Entityi18n (
idEntityi18n BIGINT NOT NULL AUTO_INCREMENT,
idEntity BIGINT NOT NULL,
lang VARCHAR(10),
title VARCHAR(200),
summary TEXT,
content TEXT,
PRIMARY KEY (idEntityi18n),
UNIQUE UN_Entityi18n_1 (idEntity, lang)
)
Type=InnoDB;
CREATE TABLE Transfer (
id BIGINT NOT NULL,
value DECIMAL,
currency VARCHAR(3),
srcAccount BIGINT,
destAccount BIGINT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Advertising (
id BIGINT NOT NULL,
adtype TINYINT,
bannerURL VARCHAR(200),
advertisingURL VARCHAR(200),
loads INTEGER,
clicks INTEGER,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Commentary (
id BIGINT NOT NULL,
title VARCHAR(100),
comment TEXT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Adorder (
id BIGINT NOT NULL,
idAd BIGINT NOT NULL,
startDate DATE,
stopDate DATE,
position TINYINT,
percent TINYINT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Entryi18n (
idEntryi18n BIGINT NOT NULL AUTO_INCREMENT,
idEntry BIGINT NOT NULL,
lang VARCHAR(10) NOT NULL,
title VARCHAR(200),
summary TEXT,
content TEXT,
PRIMARY KEY (idEntryi18n),
UNIQUE UN_Entryi18n_1 (idEntry, lang)
)
Type=InnoDB;
CREATE TABLE Link (
id BIGINT NOT NULL,
linkURL VARCHAR(200),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE History (
id BIGINT NOT NULL,
idOrigin BIGINT NOT NULL,
changedby BIGINT,
main_Version SMALLINT NOT NULL,
predecessor SMALLINT,
comment TEXT,
PRIMARY KEY (id),
UNIQUE UN_Storyi18nHist_1 (main_Version, idOrigin)
)
Type=InnoDB;
CREATE TABLE Address (
id BIGINT NOT NULL,
country VARCHAR(40),
state VARCHAR(40),
postcode VARCHAR(20),
city VARCHAR(80),
street VARCHAR(80),
tel_privat VARCHAR(40),
tel_mobil VARCHAR(40),
tel_business VARCHAR(40),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Sys_Usecase (
id BIGINT NOT NULL,
pattern VARCHAR(200),
accessflags SMALLINT,
rights BIGINT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Sys_Message (
id BIGINT NOT NULL,
i18n_Key VARCHAR(200),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Sys_Layout (
id BIGINT NOT NULL,
layout TEXT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Sys_Component (
id BIGINT NOT NULL,
can_Name VARCHAR(40),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Sys_File (
id BIGINT NOT NULL,
filetype VARCHAR(20),
folder VARCHAR(200),
filename VARCHAR(20),
content TEXT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Sys_Site (
id BIGINT NOT NULL,
site_Name VARCHAR(40),
site_URL VARCHAR(200),
folder VARCHAR(200),
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Authorisations (
authorisation_Id BIGINT NOT NULL,
idEntity BIGINT NOT NULL,
idPeople BIGINT NOT NULL,
accessflags TINYINT,
PRIMARY KEY (authorisation_Id)
)
Type=InnoDB;
CREATE TABLE Sys_Types (
id BIGINT NOT NULL,
table_Name VARCHAR(20) NOT NULL,
class_Name VARCHAR(30),
PRIMARY KEY (id),
UNIQUE (table_Name),
UNIQUE (class_Name)
)
Type=InnoDB;
CREATE TABLE Rating (
id BIGINT NOT NULL,
range TINYINT,
rating FLOAT,
totalsum VARCHAR(40),
votes INTEGER DEFAULT 0,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Choice (
id BIGINT NOT NULL,
votes INTEGER,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Price (
id BIGINT NOT NULL,
value DECIMAL,
currency VARCHAR(3),
destAccount BIGINT,
PRIMARY KEY (id)
)
Type=InnoDB;
CREATE TABLE Icon (
id BIGINT NOT NULL,
iconurl VARCHAR(200),
PRIMARY KEY (id)
);
#========================================================================== #
# Foreign Keys #
#========================================================================== #
ALTER TABLE Article
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Path
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Category
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Person
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Usergroup
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Task
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Vote
ADD FOREIGN KEY (idVoter) REFERENCES Person (id);
ALTER TABLE Vote
ADD FOREIGN KEY (idFingerprint) REFERENCES Trace (id);
ALTER TABLE Vote
ADD FOREIGN KEY (idRating) REFERENCES Rating (id);
ALTER TABLE Roles
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Point
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Area
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Pixelmap
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Query
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Image
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Container
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Container
ADD FOREIGN KEY (idEntity) REFERENCES Entity (id);
ALTER TABLE Entry
ADD FOREIGN KEY (idEntity) REFERENCES Entity (id);
ALTER TABLE Entry
ADD FOREIGN KEY (idNode) REFERENCES Entity (id);
ALTER TABLE Date_Time
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Account
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Trace
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Grid
ADD FOREIGN KEY (idEntity) REFERENCES Entity (id);
ALTER TABLE Entity
ADD CONSTRAINT Owner FOREIGN KEY (idOwner) REFERENCES Entity (id);
ALTER TABLE Entityi18n
ADD FOREIGN KEY (idEntity) REFERENCES Entity (id);
ALTER TABLE Transfer
ADD FOREIGN KEY (srcAccount) REFERENCES Account (id);
ALTER TABLE Transfer
ADD FOREIGN KEY (destAccount) REFERENCES Account (id);
ALTER TABLE Transfer
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Advertising
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Commentary
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Adorder
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Adorder
ADD FOREIGN KEY (idAd) REFERENCES Advertising (id);
ALTER TABLE Entryi18n
ADD FOREIGN KEY (idEntry) REFERENCES Entry (idEntry);
ALTER TABLE Link
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE History
ADD CONSTRAINT Entity_History FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE History
ADD FOREIGN KEY (changedby) REFERENCES Person (id);
ALTER TABLE History
ADD FOREIGN KEY (idOrigin) REFERENCES Entity (id);
ALTER TABLE Address
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Sys_Usecase
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Sys_Message
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Sys_Layout
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Sys_Component
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Sys_File
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Sys_Site
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Authorisations
ADD FOREIGN KEY (idEntity) REFERENCES Entity (id);
ALTER TABLE Authorisations
ADD FOREIGN KEY (idPeople) REFERENCES Entity (id);
ALTER TABLE Sys_Types
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Rating
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Choice
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Price
ADD FOREIGN KEY (id) REFERENCES Entity (id);
ALTER TABLE Icon
ADD FOREIGN KEY (id) REFERENCES Entity (id);
|
|
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 11, 2006 - 06:46 AM
|
|
Veteran Member


Joined: Feb 11, 2006
Posts: 1
|
|
Is there a way to generate ddl from .hbm.xml files? That is the functionality I am interested in. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 11, 2006 - 12:35 PM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2281
|
|
DDL generation is currently not possibile. We are looking at getting that integrated by MyEclipse 4.2.
It might be in an upcoming 4.1.1 maintanence release, but we haven't comitted to this timeframe.
Best,
Brian. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 11, 2006 - 02:12 PM
|
|
Moderator


Joined: Feb 03, 2006
Posts: 1117
|
|
oberinspector,
Please send us:
- your version mysql and jdbc
- what foreign key is missing
Thanks |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 12, 2006 - 09:22 AM
|
|
Moderator


Joined: Aug 21, 2004
Posts: 2281
|
|
operinspector,
On page 2 of the RE wizard, could you make sure "Generate basic typed composite IDs" is checked?
Let us know if that gets you what you need.
Best,
Brian. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Feb 28, 2006 - 10:29 PM
|
|
Veteran Member

Joined: May 26, 2003
Posts: 46
|
|
Hi,
Could I get an update of how far away is a new version that supports the hibernate console is?
Thanks,
Jon |
|
|
| |
|
|
|
 |
|
|
|