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

The Archive Base Latest Questions

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

EDIT : New issue I have got some new stuff : I am pretty

  • 0

EDIT : New issue

I have got some new stuff :

I am pretty sure it is the xml files that are messing all up.

Here is how I proceeded :

  1. I made my own database scheme
  2. I created the database (sql script)
  3. I reverse-engineered the database
  4. I fixed the associations between tables.

In my XML conf repository : src/Creasixtine/AFBundle/Resources/config/doctrine/metadata/orm

I have my all entities :

Blobs.orm.xml    Lieu.orm.xml    Operationrre.orm.xml  Pn.orm.xml              Roles.orm.xml  Service.orm.xml  Typeoperationmaintenance.orm.xml
Famille.orm.xml  Module.orm.xml  Outilsn.orm.xml       Rolepermission.orm.xml  Rre.orm.xml    Session.orm.xml  Utilisateur.orm.xml

And here is, for example, the xml file of Utilisateur :

<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Utilisateur" table="UTILISATEUR">
    <change-tracking-policy>DEFERRED_IMPLICIT</change-tracking-policy>
    <id name="userid" type="integer" column="USERID">
      <generator strategy="IDENTITY"/>
    </id>
    <field name="userdatecreation" type="date" column="USERDATECREATION"/>
    <field name="userdatevalidation" type="date" column="USERDATEVALIDATION"/>
    <field name="usermail" type="string" column="USERMAIL" length="255"/>
    <field name="userpass" type="string" column="USERPASS" length="255"/>
    <field name="uservalide" type="boolean" column="USERVALIDE"/>
    <lifecycle-callbacks/>
  </entity>
</doctrine-mapping>

And with that, I get :

Notice: Undefined index: id in /home/adrien/dev/air-france_alphanum/vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php line 1969

Old post

I have (long ago) imported a database schema.

I have a Utilisateur Entity/Class.
I successly create new recordings in my Utilisateur table by doing :

function newUser($login, $name, $mail, $pass)
    {
        $obj = new Utilisateur();
        $obj->setUsermail($mail);
        $obj->setUserpass($pass);
        $obj->setUserlogin($login);
        $obj->setUsername($name);

        $em = $this->getDoctrine()->getEntityManager();
        $em->persist($obj);
        $em->flush();

    }

Now what won’t work : I would like to get existing users in database :

    $em = $this->container->get('doctrine')->getEntityManager();
    $rre_repository = $em->getRepository('GoogleAFBundle:Utilisateur');
    $users = $rre_repository->findAll();

And I get an exception :

Notice: Undefined index: Google\AFBundle\Entity\Utilisateur in /home/adrien/dev/air-france_alphanum/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php line 121

Here is the Utilisateur class :

<?php

namespace Google\AFBundle\Entity;

use Symfony\Tests\Component\Translation\String;

use Doctrine\ORM\Mapping as ORM;

/**
 * Google\AFBundle\Entity\Utilisateur
 *
 * @ORM\Table(name="UTILISATEUR")
 * @ORM\Entity
 */
class Utilisateur
{
    /**
     * @var integer $userid
     *
     * @ORM\Column(name="USERID", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $userid;

    /**
    * @var string $userlogin
    *
    * @ORM\Column(name="USERLOGIN", type="string", length=31, nullable=false)
    */
    private $userlogin;

    /**
    * @var string $username
    *
    * @ORM\Column(name="USERNAME", type="string", length=255, nullable=true)
    */
    private $username;

    /**
     * @var date $userdatecreation
     *
     * @ORM\Column(name="USERDATECREATION", type="date", nullable=true)
     */
    private $userdatecreation;

    /**
     * @var date $userdatevalidation
     *
     * @ORM\Column(name="USERDATEVALIDATION", type="date", nullable=true)
     */
    private $userdatevalidation;

    /**
     * @var string $usermail
     *
     * @ORM\Column(name="USERMAIL", type="string", length=255, nullable=true)
     */
    private $usermail;

    /**
     * @var string $userpass
     *
     * @ORM\Column(name="USERPASS", type="string", length=255, nullable=true)
     */
    private $userpass;

    /**
     * @var boolean $uservalide
     *
     * @ORM\Column(name="USERVALIDE", type="boolean", nullable=true)
     */
    private $uservalide;

    /**
    * @ORM\OneToMany(targetEntity="Utilroles", mappedBy="userid")
    */
    private $utilroles;

    /**
    * @ORM\OneToMany(targetEntity="Connexion", mappedBy="userid")
    */
    private $connexions;

    /**
     * Get userid
     *
     * @return integer
     */
    public function getUserid()
    {
        return $this->userid;
    }

    /**
     * Set userdatecreation
     *
     * @param date $userdatecreation
     */
    public function setUserdatecreation($userdatecreation)
    {
        $this->userdatecreation = $userdatecreation;
    }

    /**
     * Get userdatecreation
     *
     * @return date
     */
    public function getUserdatecreation()
    {
        return $this->userdatecreation;
    }

    /**
     * Set userdatevalidation
     *
     * @param date $userdatevalidation
     */
    public function setUserdatevalidation($userdatevalidation)
    {
        $this->userdatevalidation = $userdatevalidation;
    }

    /**
     * Get userdatevalidation
     *
     * @return date
     */
    public function getUserdatevalidation()
    {
        return $this->userdatevalidation;
    }

    /**
     * Set usermail
     *
     * @param string $usermail
     */
    public function setUsermail($usermail)
    {
        $this->usermail = $usermail;
    }

    /**
     * Get usermail
     *
     * @return string
     */
    public function getUsermail()
    {
        return $this->usermail;
    }

    /**
     * Set userpass
     *
     * @param string $userpass
     */
    public function setUserpass($userpass)
    {
        $this->userpass = $userpass;
    }

    /**
     * Get userpass
     *
     * @return string
     */
    public function getUserpass()
    {
        return $this->userpass;
    }

    /**
     * Set uservalide
     *
     * @param boolean $uservalide
     */
    public function setUservalide($uservalide)
    {
        $this->uservalide = $uservalide;
    }

    /**
     * Get uservalide
     *
     * @return boolean
     */
    public function getUservalide()
    {
        return $this->uservalide;
    }
    public function __construct()
    {
        $this->utilroles = new DoctrineCommonCollectionsArrayCollection();
    $this->connexions = new DoctrineCommonCollectionsArrayCollection();
    }

    /**
     * Add utilroles
     *
     * @param Google\AFBundle\Entity\Utilroles $utilroles
     */
    public function addUtilroles(GoogleAFBundleEntityUtilroles $utilroles)
    {
        $this->utilroles[] = $utilroles;
    }

    /**
     * Get utilroles
     *
     * @return Doctrine\Common\Collections\Collection
     */
    public function getUtilroles()
    {
        return $this->utilroles;
    }

    /**
     * Add connexions
     *
     * @param Google\AFBundle\Entity\Connexion $connexions
     */
    public function addConnexions(GoogleAFBundleEntityConnexion $connexions)
    {
        $this->connexions[] = $connexions;
    }

    /**
     * Get connexions
     *
     * @return Doctrine\Common\Collections\Collection
     */
    public function getConnexions()
    {
        return $this->connexions;
    }

    /**
    * Set username
    *
    * @return Doctrine\Common\Collections\Collection
    */
    public function setUsername($username)
    {
        $this->username = $username;
    }

    /**
    * Get username
    *
    * @return string
    */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Set userlogin
     *
     * @return Doctrine\Common\Collections\Collection
     */
    public function setUserlogin($userlogin)
    {
        $this->userlogin = $userlogin;
    }

    /**
    * Get userlogin
    *
    * @return string
    */
    public function getUserlogin()
    {
        return $this->userlogin;
    }

}

If somone can help, I would greatly appreciate.

  • 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-26T20:31:03+00:00Added an answer on May 26, 2026 at 8:31 pm

    I’ve managed it.

    In fact, all database fields (mysql) were generated UPPERcase. My $userlogin field was to be mapped in database to USERLOGIN, as follows :

    /**
    * @var string $userlogin
    *
    * @ORM\Column(name="USERLOGIN", type="string", length=31, nullable=false)
    */
    private $userlogin;
    

    I corrected all fields, and it works properly.

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

Sidebar

Related Questions

I've got an issue involving a website that I have been using VS 2008
I've got this script, that uploads some files, connects via ssh and does some
I've got a bit of a usability issue that I'd value some input on.
EDIT ive got it almost, having and error message now that it can't find
This question I have asked before and just got answer that there is an
Seems like everyone have issue accessing local machine or internet etc from emulator. All
I have a JPanel that contains a few other objects that do stuff. I
I have got a big ListBox with vertical scrolling enabled, my MVVM has New
I have this very strange issue with my MVC 2 project. Often times, I'll
I have a custom Http Handler which manipulates HTTP POST and GET. I got

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.