Created
January 30, 2011 20:54
-
-
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 :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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