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

allow for direct access to PDO, or at least PDO::query() #64

Closed
xpavp03 opened this issue Apr 27, 2013 · 1 comment
Closed

allow for direct access to PDO, or at least PDO::query() #64

xpavp03 opened this issue Apr 27, 2013 · 1 comment

Comments

@xpavp03
Copy link

xpavp03 commented Apr 27, 2013

I believe it's currently not possible to execute PDO's query via NotORM. As a workaround, I have to store an instance of PDO before passing it over to NotORM during its initialization.
Or I have to define a class that extends NotORM and provides access to $this->connection.

Query() comes handy when you need to switch databases, optimize tables, run a batch of SQL commands or generally speaking, do things that NotORM can't do.

Thanks
Petr

@vrana
Copy link
Owner

vrana commented Jun 26, 2013

It would violate the Law of Demeter. Also, there's no easy way to access it as both $notORM->connection and $notORM->connection() are used for accessing table connection.

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

No branches or pull requests

2 participants