2011-12-05 10 views
1

Doctrine\ORM\PersistentCollectionの場合、count($Club->getUmbrellas())を実行しようとすると次のエラーが発生する特殊なエンティティ(特定のものはわかりません)があります。Doctrineが何らかの未定義のエラーを作成する

Notice: Undefined index: id in /var/www/apache/StudCon/library/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php on line 401 Fatal error: Call to a member function getValue() on a non-object in /var/www/apache/StudCon/library/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php on line 401

  • Clubメインです。
  • ClubClubClub
  • ClubUmbrellaClub
  • ClubUmbrellaClubClubこれらは情報の最も重要なビット(uはより多くを必要とする場合はお問い合わせください)です

RelationClubUmbrellaの上に間接的に関係している拡張拡張:

class Club extends \StudCon_Entity 
{ 

    /** 
    * @Column(type="string", length="150") 
    * @var string 
    */ 
    protected $type; 

    /** 
    * @Id @GeneratedValue 
    * @Column(type="bigint") 
    * @var integer 
    */ 
    protected $id; 

class ClubClub extends Club 
{ 

    /** 
    * @OneToMany(targetEntity="RelationClubUmbrella", mappedBy="club", indexBy="id") 
    */ 
    protected $umbrellas; 

class ClubUmbrella extends Club 
{ 

    /** 
    * @OneToMany(targetEntity="RelationClubUmbrella", mappedBy="umbrella") 
    */ 
    protected $clubs; 

class RelationClubUmbrella 
{ 

    const STATUS_REQUESTED = 1; 
    const STATUS_CONFIRMED = 2; 
    const STATUS_REJECTED = 3; 


    /** 
    * @Column(type="integer") 
    * @var integer 
    */ 
    protected $status; 

    /** 
    * @Id 
    * @ManyToOne(targetEntity="Club") 
    * @JoinColumn(name="umbrellaid", referencedColumnName="id") 
    * @var Category 
    */ 
    protected $umbrella; 

    /** 
    * @Id 
    * @ManyToOne(targetEntity="Club") 
    * @JoinColumn(name="clubid", referencedColumnName="id") 
    * @var Category 
    */ 
    protected $club; 

答えて

0

あなたが教義の古いバージョンを使っているように見えます。 Similarissuesが修正されましたが、latest versiontoday)を試してみる必要があります。

関連する問題