-
Notifications
You must be signed in to change notification settings - Fork 132
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
Resolves issue #88. Allows static calling of Model subclasses, ignoring namespace info during table name generation. #90
Conversation
…ng namespace info during table name generation. Model class static property $_table_use_short_name = true allows static calling of the model subclass whilst avoiding the inclusion of namespace information in the auto generated table name.
This pull request allows static requests to avoid being forced in to using the namespace + class as the auto table name. Consider the following code and the queries generated:
Also updates the docs and adds a test. P.S. I didn't know that using |
BTW I'm open to changing the static property name - |
IMHO it should be a global setting, not a per-class one. The class already has access to The point, I thought, was to prevent having to set |
I'm happy being able to set it in a single class that inherits from However, I'll code it as a global option if someone can give me an example of existing global options in Paris. So far, the only global options I have seen are for A global option could be in addition to the per class option, the flexibility may be warranted. I'd like to get some direction on this before making any further changes. |
I've just seen the Still, I'd like some consensus on whether we want to stay per class, go global or have both options. |
As an example of the inheritance I was talking about, I would do something similar to the following:
I haven't tested this yet, but I will do and will report back if it works. |
I like the idea so I am going to merge it into develop - please do test that branch. Please do consider a further PR for a more global setting like @tag suggests. |
Ok. |
Model
classstatic property $_table_use_short_name = true
allows static calling of the model subclass whilst avoiding the inclusion of namespace information in the auto generated table name.