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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:05:44+00:00 2026-05-31T20:05:44+00:00

This is my Categorias model: http://pastebin.com/Wk5iw3Hf and this is my Proyectos model: http://pastebin.com/LDTpZ3Cy One

  • 0

This is my Categorias model: http://pastebin.com/Wk5iw3Hf
and
this is my Proyectos model: http://pastebin.com/LDTpZ3Cy

One Category has many proyects.

In my repository, I´m trying to join this models, like this:

public function findMistareas() {
        $em = $this->getEntityManager();
        $consulta = $em->createQuery('SELECT c, p FROM GestionBundle:Categorias c JOIN c.proyectos p ');
        return $consulta->getResult();
}

but I´m getting this error:

Notice: Undefined index: Categorias in /Users/gitek/www/ges/vendor/doctrine/lib/Doctrine/ORM/Query/SqlWalker.php line 747

any help or clue? Maybe the problem is on the Model? but I can not see where.

  • 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-31T20:05:45+00:00Added an answer on May 31, 2026 at 8:05 pm
    /**
     * @ORM\ManyToOne(targetEntity="Categorias",inversedBy="proyectos")
     * @ORM\JoinColumn(name="categoria_id", referencedColumnName="id")
     */
    private $categoria;
    
    /**
     * @ORM\OneToMany(targetEntity="Hitos", mappedBy="Proyectos")
     * @ORM\OrderBy({"orden" = "ASC"})
     */
    private $hitos;
    

    ‘SELECT p, h FROM GestionBundle:Proyectos p JOIN p.hitos h ‘

    Your question is about categories but your query uses hitos? The mappedBy and inversedBy are case sensitive so probably need mappedBy=”proyectos” instead of mappedBy=”Proyectos”

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

Sidebar

Related Questions

So I have a DOM document that looks essentially like this <categories> <category id=1/>
How I can setup my rails app to respond to such urls: http://mydomain.com/white-halogene-lamp http://mydomain.com/children-lamps
Model: app.models.Category = Ext.regModel(Category, { fields: [ { name: 'CategoryId', type: 'int' }, {
I'm trying to get a many to many model to update when I save
https://github.com/nathanborror/django-basic-apps/blob/master/README.rst I am trying to implement this blog module my question is that the
I have a model categories: t.string :c1 t.string :c2 t.string :c3 A category could
Hey, I have models like this: class Galleries(models.Model): creation_date = models.DateTimeField() name = models.CharField(max_length=255,
This ( https://github.com/radar/forem ) is the code for the Rails 3 forum engine, but
I have model with ManyToManyField field. I also have ModelForm that uses this model.
i have a product model and a product category model. and theres a habtm

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.