Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludofleury/803241 to your computer and use it in GitHub Desktop.
Save ludofleury/803241 to your computer and use it in GitHub Desktop.
Ever dream to use admin-gen (symfony 1.4 + Doctrine 1.2) with a Model using composite primary keys ? Fast & furious tips for the routing :
app/routing.yml
In this example, my Model is identified by A string + an id.
That's why I specified requirements.
attached_file:
class: sfDoctrineRouteCollection
options:
model: AttachedFile
module: attachment
prefix_path: /attachment
column: obj_type/:obj_pk
with_wildcard_routes: true
requirements:
obj_type: [a-zA-z-_]
obj_pk: \d+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment