Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Count on Oci8 adapter #142

Open
harrysbaraini opened this issue Oct 20, 2015 · 5 comments
Open

Count on Oci8 adapter #142

harrysbaraini opened this issue Oct 20, 2015 · 5 comments

Comments

@harrysbaraini
Copy link

Hello,

I can't get DB-Connected resources fetch single item from Oracle. I always get a "Item not found" message, but I've noticed that it only occurs when I call $resultSet->count(), because it returns null.

$resultSet = $this->table->select([ $this->identifierName => $id ]);

        if (0 === $resultSet->count()) {
            throw new \Exception('Item not found', 404);
        }

        return $resultSet->current();

Is there any restriction to the Oci8 adapter?

I can get it to work if I don't check count() function, but to do so, I have to overwrite every DB-Connected resource class.

@mpalourdio
Copy link

I have exactly the same problem on Oci8. Removing $resultSet->count() in DbConnectedResource#fetch($id) fixes the problem with single items.

I see you have filled an issue here zendframework/zend-db#46 , thanks

@harrysbaraini
Copy link
Author

Yes, I tried to persuade my boss to use Apigility to rewrite a legacy application, but this problem was an immense wall to that.

Furthermore, as we can note, I got no answer.

@TomHAnderson
Copy link

You three are the vested interest.

Why should someone go and fix a bug you're having an issue with?

Please submit a pull request because you are experiencing the problem you're likely best suited to fix it. Rest assured if this results in a patch to Apigility or ZF2 it will get review.

@harrysbaraini
Copy link
Author

Sorry man, but I don't want someone to fix a bug for me, I just wanted to know if it's working the way it supposed to be rather than being a bug.
Unfortunately I've moved to another job, so I don't have access to a Oracle database neither access to the modified code.

@michalbundyra
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools; a new issue has been opened at laminas-api-tools/api-tools#43.

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

No branches or pull requests

4 participants