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 5844857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:21:09+00:00 2026-05-22T12:21:09+00:00

I have the follwing fixiture file: Category: webDev: name: Development Web webDesign: name: Web

  • 0

I have the follwing fixiture file:

Category:
   webDev:
      name: Development Web
   webDesign:
      name: Web Desing
   Autres:
      name: Autres

Post:
   Post1:
      Category: webDev
      title: Ceci est un Test 1
      content: TEST
   Post2:
      Category: webDesign
      title: Ceci est un Test 2
      content: TEST
   Post3:
      Category: Autres
      title: Ceci est un Test 3
      content: TEST

The problem is that webDev is not recognized and the id is not automatically seted.

I don’t want to use like that:

 Post1:
      category_id: 1
      title: Ceci est un Test 1
      content: TEST

But I want to use the name of the webDev, webDesign or Autres categories names. Is working and I have no error when I run:

./symfony doctrine:build --all --no-confirmation --and-load 

However, when I look in MySQL database instead of the category id I get NULL. Why? Where is the error?

Here is my schema.yml

Category:
 tableName: categories
 columns:
  name: string(100)

Post:
 tableName: posts
 actAs:
  Timestampable: ~
  Sluggable:
   fields: [title]
 columns:
  category_id: integer
  title: string(100)
  content: text
 relations:
  Category:
   type: one
   foreignType: many
   local: id
   foreign: id
  • 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-22T12:21:09+00:00Added an answer on May 22, 2026 at 12:21 pm

    According to your schema, the foreign key will bet set to post.id instead of post.category_id.

    try local: category_id instead of local: id

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

Sidebar

Related Questions

I have the follwing code <form enctype="multipart/form-data" action="upload.php" method="POST"> Please choose a file: <input
As being quite a newbie in linux, I have the follwing question. I have
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have following text in a file 23456789 When I tried to replace the
I have a new web app that is packaged as a WAR as part
I have follwing set of files: SourceFile.xml: <?xml version=1.0 encoding=utf-8 ?> <Employees> <Employee id=1>
Good Morning Users, i have implemented the follwing deleagate Method: - (void)openFlowView:(AFOpenFlowView *)openFlowView doubleTapOnIndex:(int)index
I have the following models defined: class Team(models.Model): Name = models.CharField(max_length=250) class Fixture(models.Model): HomeTeam
Let's say we have the follwing code: SerialPort port = new SerialPort(COM2, 115200); port.Open();
I have the follwing listener used via f:event type=preRenderView listener=#{sessionCheck.loginVerify}/ in my jsf page:

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.