Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6131109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:56:09+00:00 2026-05-23T16:56:09+00:00

I have an error trying to build a model from an existing database in

  • 0

I have an error trying to build a model from an existing database in a symfony project using the Propel ORM.

The error is this:

build-propel.xml:474:20: The 1:1 relationship expressed by foreign key a_table_on_my_schema_FK_1 is defined in both directions; Propel does not currently support this (if you must have both foreign key constraints, consider adding this constraint with a custom SQL file.)

the schema.yml file is really extensive but the description of the table that causes the error (the first not correctly created) is like this:

self_referenced_table:
_attributes: { phpName: SelfReferencedTable }
[...]
JERARQUIC_CODE: { phpName: JerarquicCode, type: INTEGER, size: '8', required: false, foreignTable: self_referenced_table, foreignReference: JERARQUIC_CODE, onDelete: RESTRICT, onUpdate: RESTRICT }
[...]

I think this error is because of the self referenced table.

I need to implement a jerarquic relation between many elements so this implementation is a good way to do it. But causes me this problem on construction.

Can you give me some clues? have someone had this error? what would you do?

thank you!! 😀

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:56:10+00:00Added an answer on May 23, 2026 at 4:56 pm

    Solved: It was not a self referencing table error, as said by @Colin Fine. The error was on the source database. I generated the schema.yml from an existing database on mysql. The error was there: the target attribute of the reference was not the identifier of the table, was the reference attribute itself. So, the generated schema.yml contained wrong definitions. I think i havn’t explained well enough:

    self_referenced_table was that:

    _attributes: { phpName: SelfReferencedTable }
    [...]
    JERARQUIC_CODE: { phpName: JerarquicCode, type: INTEGER, size: '8', required: false, foreignTable: self_referenced_table, foreignReference: JERARQUIC_CODE, onDelete: RESTRICT, onUpdate: RESTRICT }
    [...]

    self_referenced_table should be:

    _attributes: { phpName: SelfReferencedTable }
    [...]
    JERARQUIC_CODE: { phpName: JerarquicCode, type: INTEGER, size: '8', required: false, foreignTable: self_referenced_table, foreignReference: TABLE_CODE, onDelete: RESTRICT, onUpdate: RESTRICT }
    [...]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error when trying to link a win32 exe project. I have
This time I have an error which I have been trying again to figure
I have been trying to get around this error for a day now and
I have seen this question , and using its method throws up an error
I have a WCF service, hosted in IIS returning the following error (when trying
I have the following error Exception in thread main javax.naming.NameNotFoundException: CounterBean not bound trying
Greetings, I have problem with errorPlacement, I'm trying to place the error message next
I am trying to prevent VS from breaking on JS errors. I have the
I've been trying to build my first rails app and have gotten stuck on
I'm getting the following errors from MSBuild while trying to build a solution: C:\dev\MySln.sln

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.