/** * (non-PHPdoc) * @see BaseEntity::__loadDaoMap() */ public function __loadDaoMap() { DaoMap::begin($this, 'r'); DaoMap::setStringType('name', 'varchar'); DaoMap::setManyToMany("userAccounts", "UserAccount", DaoMap::RIGHT_SIDE, "ua"); parent::__loadDaoMap(); DaoMap::createUniqueIndex('name'); DaoMap::commit(); }
/** * (non-PHPdoc) * @see BaseEntity::__loadDaoMap() */ public function __loadDaoMap() { DaoMap::begin($this, 'ua'); DaoMap::setStringType('username', 'varchar', 100); DaoMap::setStringType('password', 'varchar', 40); DaoMap::setManyToOne("person", "Person", "p"); DaoMap::setManyToMany("roles", "Role", DaoMap::LEFT_SIDE, "r", false); parent::__loadDaoMap(); DaoMap::createUniqueIndex('username'); DaoMap::createIndex('password'); DaoMap::commit(); }