Does anybody know how transform this query:

SELECT \* from `diminventory` where partnumber='350964-B22' or partnumber in (SELECT partnumber from `dimparts` where parentpartnumber='350964-b22')

in a cakephp query 

Thanks