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

make sure magic calls on entity find the correct table name #50

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mkuettel
Copy link

I had two tables called pages and page_contents.

Beforehand when calling for example $page->hasPageContents() on a Page Entity then the library looks for the database wrong table pageContents because __call doesn't translate the method name from camelCase to snake_case.

This commit fixes this that the snake-case table names such as page_contents get found.

I had two tables called `pages` and `page_contents`.

Beforehand when calling for example `$page->hasPageContents()` on a Page
Entity then the library looks for the database wrong table `pageContents`
because `__call` doesn't translate the method name from camelCase to
snake_case.

This commit fixes this that the snake-case table names such as
`page_contents` get found.

Beforehand when calling for example $page->hasPageContents() on a an
entity then looks for the database wroing table `page_contents`. This
commit fixes this that the snake-case table name `page_contents`
gets found.
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

Successfully merging this pull request may close these issues.

None yet

1 participant