symfony1 - Symfony doctrine determine foreign Alias List is empty -


in symfony 1.4, doctrine have snippet schema.yml

attendance:   columns:     id: { type: integer(4), primary: true, autoincrement: true }     user_id: { type: integer(4) }    relations:     joomlauser: { class: josuser, local: user_id, foreignalias: attendancelist } 

and

josuser:   tablename: jos_users   columns:     id: { type: integer(4), primary: true, autoincrement: true }   relations:     attendancelist: { class: attendance, local: id, foreign: user_id } 

what efficient way determine josuser there no attendance records. tried model/doctrine/josuser.class.php

count($this->getattendancelist()) 

but returns doctrine record fields empty user_id

schema :

josuser:     tablename: jos_users     columns:         id: { type: integer(4), primary: true, autoincrement: true }     relations:     attendancelist: { type: many, class: attendance, local: id, foreign: user_id } 

with type: many, getattendancelist() should return doctrine_collection (see josuser base class in lib/model/doctrine/base/basejosuser.class.php), can use

$this->getattendancelist()->count()


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -