Details
Description
I am playing with reverse engineering with Oracle and I have some problems:
My schema:
drop table PHONE_NUMBER; drop table CUSTOMER; create table CUSTOMER ( CUSTOMER_ID NUMBER(4) not null, CUSTOMER_LASTNAME VARCHAR2(50) not null, CUSTOMER_MODIFIED DATE, constraint PK_CUSTOMER primary key (CUSTOMER_ID) using index tablespace TBS_INDEX storage ( initial 100K next 100K ) ) storage ( initial 100K next 100K ) tablespace TBS_DATA; create table PHONE_NUMBER ( PHONE_NUMBER_ID NUMBER(4) not null, CUSTOMER_ID NUMBER(4) not null, PHONE_NUMBER VARCHAR2(50) not null, PHONE_NUMBERMODIFIED DATE, constraint PK_PHONE_NUMBER primary key (PHONE_NUMBER_ID, CUSTOMER_ID) using index tablespace TBS_INDEX storage ( initial 100K next 100K ) ) storage ( initial 100K next 100K ) tablespace TBS_DATA; alter table PHONE_NUMBER add constraint PHONE_NUMBER__CUSTOMER foreign key (CUSTOMER_ID) references CUSTOMER (CUSTOMER_ID);
I obtain "Fatal error: Uncaught exception 'Doctrine\ORM\Mapping\MappingException' with message 'Property "customerId" in "PhoneNumber" was already declared, but it must be declared only once'"
It's because a foreign key is a component of the primary key.
Activity
Mickael Perraud
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
I am playing with reverse engineering with Oracle and I have some problems: My schema: {code} drop table TABLE_TEST2; drop table TABLE_TEST1; create table TABLE_TEST1 ( TEST1_FIRST_COLUMN NUMBER(4) not null, TEST1_SECOND_COLUMN VARCHAR2(50) not null, TEST1_THIRD_COLUMN DATE, constraint PK_TABLE_TEST1 primary key (TEST1_FIRST_COLUMN) using index tablespace TBS_INDEX storage ( initial 100K next 100K ) ) storage ( initial 100K next 100K ) tablespace TBS_DATA; create table TABLE_TEST2 ( TEST2_FIRST_COLUMN NUMBER(4) not null, TEST1_FIRST_COLUMN NUMBER(4) not null, TEST2_SECOND_COLUMN VARCHAR2(50) not null, TEST2_THIRD_COLUMN DATE, constraint PK_TABLE_TEST2 primary key (TEST2_FIRST_COLUMN, TEST1_FIRST_COLUMN) using index tablespace TBS_INDEX storage ( initial 100K next 100K ) ) storage ( initial 100K next 100K ) tablespace TBS_DATA; alter table TABLE_TEST2 add constraint TABLE_TEST2__TABLE_TEST1 foreign key (TEST1_FIRST_COLUMN) references TABLE_TEST1 (TEST1_FIRST_COLUMN); {code} I obtain "Fatal error: Uncaught exception 'Doctrine\ORM\Mapping\MappingException' with message 'Property "test1FirstColumn" in "TableTest3" was already declared, but it must be declared only once'" It's because a foreign key is a component of the primary key. |
I am playing with reverse engineering with Oracle and I have some problems: My schema: {code} drop table PHONE_NUMBER; drop table CUSTOMER; create table CUSTOMER ( CUSTOMER_ID NUMBER(4) not null, CUSTOMER_LASTNAME VARCHAR2(50) not null, CUSTOMER_MODIFIED DATE, constraint PK_CUSTOMER primary key (CUSTOMER_ID) using index tablespace TBS_INDEX storage ( initial 100K next 100K ) ) storage ( initial 100K next 100K ) tablespace TBS_DATA; create table PHONE_NUMBER ( PHONE_NUMBER_ID NUMBER(4) not null, CUSTOMER_ID NUMBER(4) not null, PHONE_NUMBER VARCHAR2(50) not null, PHONE_NUMBERMODIFIED DATE, constraint PK_PHONE_NUMBER primary key (PHONE_NUMBER_ID, CUSTOMER_ID) using index tablespace TBS_INDEX storage ( initial 100K next 100K ) ) storage ( initial 100K next 100K ) tablespace TBS_DATA; alter table PHONE_NUMBER add constraint PHONE_NUMBER__CUSTOMER foreign key (CUSTOMER_ID) references CUSTOMER (CUSTOMER_ID); {code} I obtain "Fatal error: Uncaught exception 'Doctrine\ORM\Mapping\MappingException' with message 'Property "customerId" in "PhoneNumber" was already declared, but it must be declared only once'" It's because a foreign key is a component of the primary key. |
Roman S. Borschel
made changes -
| Assignee | Roman S. Borschel [ romanb ] | Benjamin Eberlei [ beberlei ] |
Benjamin Eberlei
made changes -
| Parent |
|
|
| Issue Type | Bug [ 1 ] | Sub-task [ 5 ] |
Benjamin Eberlei
made changes -
| Summary | Reverse engineering with Oracle | Reverse engineering with Oracle (DBDriver and Associations as Identifier) |
Benjamin Eberlei
made changes -
| Fix Version/s | 2.1 [ 10022 ] |
Benjamin Eberlei
made changes -
| Fix Version/s | 2.x [ 10090 ] | |
| Fix Version/s | 2.1 [ 10022 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 11559 ] | jira-feedback [ 13854 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 13854 ] | jira-feedback2 [ 15718 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 15718 ] | jira-feedback3 [ 17975 ] |