Hello everyone.
Can you use as the primary key of a class/table a field of type
varchar, with symfony?
I can we imagine yes, but how to set generator.yml and/or routing.yml
to support primary key that are alphanumeric characters?

Example:

# config/schema.yml
connection: propel

classes:
  Person:
    columns:
      badge:
        type: varchar(20)
        primaryKey: true
        required: true
      name: varchar(255)

# apps/myapp/config/schema.yml
person:
  class: sfPropelRouteCollection
  options:
    model:               Person
    module:              person
    prefix_path:         person
    column:              badge
    with_wildcard_routes: true

homepage:
  url:   /
  param: { module: default, action: index }

default_index:
  url:   /:module
  param: { action: index }

default:
  url:   /:module/:action/*


# apps/myapp/modules/person/config/generator.yml
generator:
  class: sfPropelGenerator
  param:
    model_class:           Person
    theme:                 admin
    non_verbose_templates: true
    with_show:             false
    singular:              ~
    plural:                ~
    route_prefix:          person
    with_propel_route:     1

    config:
      actions: ~
      fields:  ~
      list:    ~
      filter:  ~
      form:    ~
      edit:    ~
      new:     ~


This example generates the following error when I execute "person/ab12/
edit" action:

"Action "person/ab12" does not exist."


I am doing something wrong?

Thanks in advance!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to