-
Notifications
You must be signed in to change notification settings - Fork 101
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 singular table names when baking fixtures #85
Conversation
$data = $schemaCollection->describe($useTable); | ||
try { | ||
$data = $schemaCollection->describe($useTable); | ||
} catch (Exception $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should catch the specific exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am. Schema/Collection::describe()
throws a Cake\Database\Exception
, which is what I'm catching here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok
I had the same issues with recommended i18n table. |
Is it possible to add a test for this? |
Test done :) |
Any reason you didn't use the |
Maybe he tried to generate fixtures with |
@markstory, I was running |
Ok, with |
Allow for singular table names when baking fixtures
Encountered a use case where I am baking fixtures for all my tables. I have a few tables where the table name is singular. This PR adds in the ability to fallback to a singular table if the plural version does not exist.