Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Foreign-key name must be unique?

propel
Discussion topic

Back to topic list

Foreign-key name must be unique?

Reply

Author Oleg Marchuk <kingoleg at gmail dot com>
Full name Oleg Marchuk <kingoleg at gmail dot com>
Date 2008-04-25 05:46:05 PDT
Message Hello, Hans,

As I can not create any issue in trac (it names me as a spamer), I write you

I use 3 table: ''A'', ''B'', ''C''. ''A'' & ''B'' refer ''C'' with FK
relations with same names: ''usedBy''. When I run {{{$propel-gen . }}} I get
php fatal error:
{{{
Fatal error: Nesting level too deep - recursive dependency? in
/usr/share/php/prope​l/engine/database/mo​del/Database.php on line 417

Call Stack:
    0.0003 103792 1. {main}() /usr/share/php/phing.php:0
    0.0531 6817216 2. Phing::fire() /usr/share/php/phing.php:41
    0.0531 6817816 3. Phing::start() /usr/share/php/phing​/Phing.php:262
    0.0544 6935248 4. Phing->runBuild()
/usr/share/php/phing​/Phing.php:164
    0.1788 15973536 5. Project->executeTargets()
/usr/share/php/phing​/Phing.php:508
    0.1789 15973536 6. Project->executeTarget()
/usr/share/php/phing​/Project.php:682
    0.1973 16052320 7. Target->performTasks()
/usr/share/php/phing​/Project.php:709
    0.1974 16052320 8. Target->main()
/usr/share/php/phing​/Target.php:263
    0.1975 16052320 9. Task->perform()
/usr/share/php/phing​/Target.php:240
    0.1998 16079320 10. PhingTask->main()
/usr/share/php/phing​/Task.php:253
    0.1998 16079320 11. PhingTask->processFile()
/usr/share/php/phing​/tasks/system/PhingT​ask.php:150
    0.4089 21309408 12. Project->executeTarget()
/usr/share/php/phing​/tasks/system/PhingT​ask.php:275
    0.4116 21313712 13. Target->performTasks()
/usr/share/php/phing​/Project.php:709
    0.4118 21313712 14. Target->main()
/usr/share/php/phing​/Target.php:263
    0.4118 21313712 15. Task->perform()
/usr/share/php/phing​/Target.php:240
    0.4134 21316632 16. PhingCallTask->main()
/usr/share/php/phing​/Task.php:253
    0.4135 21316632 17. PhingTask->main()
/usr/share/php/phing​/tasks/system/PhingC​allTask.php:109
    0.4135 21316632 18. PhingTask->processFile()
/usr/share/php/phing​/tasks/system/PhingT​ask.php:150
    0.5748 22112240 19. Project->executeTarget()
/usr/share/php/phing​/tasks/system/PhingT​ask.php:275
    0.5814 22119480 20. Target->performTasks()
/usr/share/php/phing​/Project.php:709
    0.5816 22119480 21. Target->main()
/usr/share/php/phing​/Target.php:263
    0.5846 22119576 22. Task->perform()
/usr/share/php/phing​/Target.php:240
    0.5850 22119576 23. PhingCallTask->main()
/usr/share/php/phing​/Task.php:253
    0.5851 22119576 24. PhingTask->main()
/usr/share/php/phing​/tasks/system/PhingC​allTask.php:109
    0.5851 22119576 25. PhingTask->processFile()
/usr/share/php/phing​/tasks/system/PhingT​ask.php:150
    0.7476 22876272 26. Project->executeTarget()
/usr/share/php/phing​/tasks/system/PhingT​ask.php:275
    0.7488 22881096 27. Target->performTasks()
/usr/share/php/phing​/Project.php:709
    0.7489 22881096 28. Target->main()
/usr/share/php/phing​/Target.php:263
    0.7490 22881096 29. Task->perform()
/usr/share/php/phing​/Target.php:240
    0.7628 22955144 30. PropelSQLTask->main()
/usr/share/php/phing​/Task.php:253
    0.7628 22955144 31. AbstractPropelDataMo​delTask->getDataM​odels()
/usr/share/php/prope​l/phing/PropelSQLTas​k.php:143
    0.7629 22955144 32. AbstractPropelDataMo​delTask->loadData​Models()
/usr/share/php/prope​l/phing/AbstractProp​elDataModelTask.php:​165
    0.7953 23313560 33. AppData->getDatabase()
/usr/share/php/prope​l/phing/AbstractProp​elDataModelTask.php:​484
    0.7953 23313560 34. AppData->doFinalI​nitialization()
/usr/share/php/prope​l/engine/database/mo​del/AppData.php:137
    0.7953 23313560 35. Database->doFinal​Initialization()
/usr/share/php/prope​l/engine/database/mo​del/AppData.php:185
    0.7957 23314136 36. in_array()
/usr/share/php/prope​l/engine/database/mo​del/Database.php:417​
}}}

The problem in {{{in_array($currFK​,$referrers)}}} statement.

Schema.xml is in attached files.

--
King Oleg
----
http://kingoleg.live​journal.com/
Attachments

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

Foreign-key name must be unique? Oleg Marchuk <kingoleg at gmail dot com> Oleg Marchuk <kingoleg at gmail dot com> 2008-04-25 05:46:05 PDT
Messages per page: