[FLOW3-general] FLOW3 query on extended object

Bernhard Fischer bernhard at fischli.org
Tue Jan 10 15:31:32 CET 2012


I would say this can't work because name is a PersonName object and the 
table reference name.alias inside your query doesn't exist. There should 
be an SQL error in your logfile. Isn't it?

On 01/10/2012 03:11 PM, Thomas Plessis wrote:
> Hi guys,
>
> I need to make a search query in my members list. A member object extends the Person class of Flow3. Here is my search method in the MemberRepository :
>
> 	/**
> 	 * Finds members which match the specified nickname
> 	 *
> 	 * @param string $nickname Nickname to search
> 	 * @return \TYPO3\FLOW3\Persistence\QueryResultProxy The members
> 	 */
> 	public function findByNickname($nickname) {
> 		$query = $this->createQuery();
> 		return $query->matching($query->like('name.alias', '%' . $nickname . '%', FALSE))->execute();
> 	}
>
> But No results founds. Is there troubles with inheritance of Person class? I think that the name property can't be found because it's not a field of the member's table… :/
> Any ideas?
>
> regards,
>
> Thomas Plessis
> Développeur multimédia
> --
> TOTEMnumerique
> 9, Place St Étienne
> 31000 Toulouse
> T. 05 61 14 64 54
> F. 05 61 14 64 55
>
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general


More information about the FLOW3-general mailing list