Hi,
i'm new at JPA and this stuff. After working with a tutorial i've got this error. Build it with ANT and Hibernate. Cant really figure out my problem...
3.2 (MyEclipse):
persistence.xml:
MySQL 5.0.51a-3ubuntu5.1:
Code:
[hibernatetool] alter table ORDERS
[hibernatetool] drop
[hibernatetool] foreign key FK8B7256E5B9F34830;
[hibernatetool] alter table ORDER_DETAIL
[hibernatetool] drop
[hibernatetool] foreign key FK4A94AA82D58340C7;
[hibernatetool] alter table ORDER_DETAIL
[hibernatetool] drop
[hibernatetool] foreign key FK4A94AA82342DB10F;
[hibernatetool] alter table ORDER_INVOICE
[hibernatetool] drop
[hibernatetool] foreign key FK1FFDF6FC342DB10F;
[hibernatetool] drop table if exists CUSTOMER;
[hibernatetool] drop table if exists ORDERS;
[hibernatetool] drop table if exists ORDER_DETAIL;
[hibernatetool] drop table if exists ORDER_INVOICE;
[hibernatetool] drop table if exists PRODUCT;
[hibernatetool] drop table if exists PRODUCT_SURVEY;
[hibernatetool] create table CUSTOMER (
[hibernatetool] CUST_ID bigint not null auto_increment,
[hibernatetool] FIRST_NAME varchar(50),
[hibernatetool] LAST_NAME varchar(50) not null,
[hibernatetool] STREET varchar(255),
[hibernatetool] primary key (CUST_ID)
[hibernatetool] );
[hibernatetool] create table ORDERS (
[hibernatetool] ORDER_ID bigint not null auto_increment,
[hibernatetool] CUST_ID bigint,
[hibernatetool] OREDER_DESC varchar(255),
[hibernatetool] ORDER_DATE date,
[hibernatetool] TOTAL_PRICE double precision,
[hibernatetool] LAST_UPDATED_TIME date,
[hibernatetool] primary key (ORDER_ID)
[hibernatetool] );
[hibernatetool] create table ORDER_DETAIL (
[hibernatetool] ORDER_ID bigint not null,
[hibernatetool] PROD_ID bigint not null
[hibernatetool] );
[hibernatetool] create table ORDER_INVOICE (
[hibernatetool] INVOICE_ID bigint not null auto_increment,
[hibernatetool] AMOUNT_DUE double precision,
[hibernatetool] DATE_CANCELLED date,
[hibernatetool] ORDER_ID bigint,
[hibernatetool] DATE_RAISED date,
[hibernatetool] DATE_SETTLED date,
[hibernatetool] LAST_UPDATED_TIME date,
[hibernatetool] primary key (INVOICE_ID),
[hibernatetool] unique (ORDER_ID)
[hibernatetool] );
[hibernatetool] create table PRODUCT (
[hibernatetool] PROD_ID bigint not null auto_increment,
[hibernatetool] REGULAR_PRICE varchar(255),
[hibernatetool] PROD_DESC varchar(200),
[hibernatetool] PROD_NAME varchar(50) not null,
[hibernatetool] LAST_UPDATED_TIME date,
[hibernatetool] primary key (PROD_ID)
[hibernatetool] );
[hibernatetool] create table PRODUCT_SURVEY (
[hibernatetool] SURVEY_ID bigint not null auto_increment,
[hibernatetool] PROD_ID bigint not null,
[hibernatetool] SURVEY_RESULT text not null,
[hibernatetool] LAST_UPDATED_TIME datetime,
[hibernatetool] YEAR_OF_SURVEY integer,
[hibernatetool] primary key (SURVEY_ID)
[hibernatetool] );
[hibernatetool] alter table ORDERS
[hibernatetool] add index FK8B7256E5B9F34830 (CUST_ID),
[hibernatetool] add constraint FK8B7256E5B9F34830
[hibernatetool] foreign key (CUST_ID)
[hibernatetool] references CUSTOMER (CUST_ID);
[hibernatetool] alter table ORDER_DETAIL
[hibernatetool] add index FK4A94AA82D58340C7 (PROD_ID),
[hibernatetool] add constraint FK4A94AA82D58340C7
[hibernatetool] foreign key (PROD_ID)
[hibernatetool] references PRODUCT (PROD_ID);
[hibernatetool] alter table ORDER_DETAIL
[hibernatetool] add index FK4A94AA82342DB10F (ORDER_ID),
[hibernatetool] add constraint FK4A94AA82342DB10F
[hibernatetool] foreign key (ORDER_ID)
[hibernatetool] references ORDERS (ORDER_ID);
[hibernatetool] alter table ORDER_INVOICE
[hibernatetool] add index FK1FFDF6FC342DB10F (ORDER_ID),
[hibernatetool] add constraint FK1FFDF6FC342DB10F
[hibernatetool] foreign key (ORDER_ID)
[hibernatetool] references ORDERS (ORDER_ID);
[hibernatetool] 4 errors occurred while performing <hbm2ddl>.
[color=red][hibernatetool] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test2.ORDERS' doesn't exist
[hibernatetool] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test2.ORDER_DETAIL' doesn't exist
[hibernatetool] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test2.ORDER_DETAIL' doesn't exist
[hibernatetool] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test2.ORDER_INVOICE' doesn't exist[/color]
BUILD SUCCESSFUL