Support Topics Documentation Slack YouTube Blog

->find() returning empty object, advanced query throwing error

My table is called Items consisting of sale items.
I can run findFirst() and findLast() which returns an object:
$getitems = Backendless::$Persistence->of(‘Items’)->findFirst();
If I run just or any variation from your docs:
$getitems = Backendless::$Persistence->of(‘Items’)->find();
I get an empty object vs getting simply everything from the table.
My set class actions seem to be working ok but not having luck with getting. Calling a backendless query:
$query = new BackendlessDataQuery();
also results in a page break. Am I missing an include or use?

Try this instead:
$getitems = Backendless::$Persistence->of(‘Items’)->find()->getAsObjects();

Thank You, that works.