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

Use Application_Model instead of Default_Model #20

Open
wjgilmore opened this issue Oct 4, 2010 · 1 comment
Open

Use Application_Model instead of Default_Model #20

wjgilmore opened this issue Oct 4, 2010 · 1 comment

Comments

@wjgilmore
Copy link
Contributor

At one point or another the Zend Framework began using Application_Model for model prefixes rather than Default_Model, yet zf-doctrine is using the latter convention, meaning the developer must remember to cite the appropriate prefix when invoking models. This may very well be a Zend Framework-related configuration matter, but is it possible to use the Application_Model prefix with zf-doctrine generated models?

@kaptenpeter
Copy link

Yes it is possible.

Example:

Application_Model_User:
  columns:
    username: string(255)
    password: string(255)
  relations:
    Roles:
      class: Application_Model_Role
      refClass: Application_Model_UserRole
      foreignAlias: Users
      local: user_id
      foreign: role_id
    Permissions:
      class: Application_Model_Permission
      refClass: Application_Model_UserPermission
      foreignAlias: Users
      local: user_id
      foreign: permission_id

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