With Propel (but I think with Doctrine too) tables/columns can have
whatever name you want, you simply have to use the attribute phpName
in the schema definition:

propel:
  systemUsers:
    _attributes: { phpName: User }
    id: ~
    userName: { type: varchar(255), required: false, phpName:
user_name }

Using phpName you'll be able to use the object as follows:

$category = new User();
$category->setUserName('my_username');
$category->save();

And Propel will handle everything :)


On Jun 7, 1:48 pm, Andrew Chapman <nyc...@gmail.com> wrote:
> Hi all,
>
> I've inherited a database that uses camel case for database table
> names and field names,
>
> e.g.
>
> Database table name: systemUsers
>
> Field names:
>
> id
> userName
> firstName
> lastName
>
> etc.
>
> I've noticed that most of the symfony documentation uses a lowercase
> name_name convention for naming database tables and fields.    Is
> there anything preventing me using camel case instead?  Will symfony
> and propel work OK using camel case?
>
> Thanks in advance,
> Andrew.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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

Reply via email to