I have simple problem what I cannot understand why it's not working... Server: latest ZendServer CE, ZF: 1.11.11, Doctrine: 1.2.2
YAML schema:
Uzytkownik: tableName: uzytkownicy columns: id: type: integer fixed: false unsigned: true primary: true autoincrement: true uzytkownik_dane_id: type: integer login: type: string(64) notnull: true haslo: type: string(96) notnull: true email: type: string(192) notnull: true nazwa: type: string(64) relations: UzytkownikDane: local: uzytkownik_dane_id foreign: id foreignAlias: Dane foreignType: one UzytkownikDane: tableName: uzytkownicy_dane columns: id: type: integer fixed: false unsigned: true primary: true autoincrement: true imie: type: string(128) nazwisko: type: string(128) kraj: type: string(32) wojewodztwo: type: string(64) miejscowosc: type: string(128) adres: type: string(128) kod: type: string(16) telefon: type: string(16) relations: Uzytkownik: local: id foreign: uzytkownik_dane_id
Model generated via Doctrine Cli build-all-reload:
hasOne('Application_Model_UzytkownikDane as UzytkownikDane', array( 'local' => 'uzytkownik_dane_id', 'foreign' => 'id')); } }
As you can see doctrine Cli ignored my alias and setup default: Application_Model_UzytkownikDane as UzytkownikDane... Why? Secound thing is that (may it's important i don't know...) Doctrine Cli output me error when i build-all models form yml file:
build-all-reload - Are you sure you wish to drop your databases? (y/n) y build-all-reload - Successfully dropped database for connection named 'doctrine' build-all-reload - Generated models successfully from YAML schema build-all-reload - Successfully created database for connection named 'doctrine' SQLSTATE[HY000]: General error: 1005 Can't create table 'testdb.#sql-188_3a' (e rrno: 150). Failing Query: "ALTER TABLE uzytkownik ADD CONSTRAINT uzytkownik_uzy tkownik_dane_id_uzytkownik_dane_id FOREIGN KEY (uzytkownik_dane_id) REFERENCES u zytkownik_dane(id)". Failing Query: ALTER TABLE uzytkownik ADD CONSTRAINT uzytko wnik_uzytkownik_dane_id_uzytkownik_dane_id FOREIGN KEY (uzytkownik_dane_id) REFE RENCES uzytkownik_dane(id)
why? ofc all working relations working etc.. but alias not working and Cli outputs the error... Regards