Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xyster_Orm::find() does not support a Criterion argument #3

Open
doublecompile opened this issue Apr 30, 2015 · 0 comments
Open

Xyster_Orm::find() does not support a Criterion argument #3

doublecompile opened this issue Apr 30, 2015 · 0 comments

Comments

@doublecompile
Copy link
Member

After successfully using it for a findAll() call, I built a Xyster_Data_Junction and wanted to use that for a find() call as well. Unfortunately, I found that find() only takes an array and that the downstream classes all are only supporting that array either. It would be good if findAll() and find() shared the same criteria schema.

For now, my personal workaround for this is to fallback to findAll():

      $criteria = ...some Criterion...;
      $result = $orm->findAll('EntityName', $criteria);
      if (count($result)) {
        foreach ($result as $return) break;
      } else {
        $return = NULL;
      }
      return $return;

Reporter: Maurice Makaay
Begin: 2009-08-24
Completed: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant