I am working on a user profile plugin that I am planning on releasing
to the community once it's one, I am looking for some advice on how to
approach something.
In the past I have worked on ecommerce systems that have had product
attributes, and each attribute was mapped to a list of values, then
each product mapped to an attribute/value pair. I was thinking about
taking the same approach. The problem is I want to allow some free
form values for some attributes and not for others. I am not sure
the correct way to approach it. here's what my schema looks like now,
I am looking for some advice as to how to approache the 2 kinds of
attributes.
Thoughts?
James
sf_simple_user_profile_member:
_attributes: { phpName:
sfSimpleUserProfileAttributeCategory }
id:
enabled_status: { type: boolean, default: false }
created_at:
updated_at:
sf_simple_user_profile_attribute_category:
_attributes: { phpName:
sfSimpleUserProfileAttributeCategory }
id:
name: { type: varchar(255) }
created_at:
updated_at:
sf_simple_user_profile_attribute_name:
_attributes: { phpName:
sfSimpleUserProfileAttributeName }
id:
name: { type: varchar(64) }
enabled_status: { type: boolean, default: false }
sort_order: { type: integer, default:
0 }
created_at:
updated_at:
sf_simple_user_profile_attribute_value:
_attributes: { phpName:
sfSimpleUserProfileAttributeValue }
id:
name: { type: varchar(64) }
sort_order: { type: integer, default:
0 }
created_at:
updated_at:
sf_simple_user_profile_attribute_category_name_map:
_attributes: { phpName:
sfSimpleUserProfileAttributeCategoryNameMap }
id:
attribute_category_id: { type: integer,
foreignTable: sf_simple_user_profile_attribute_category,
foreignReference: id }
attribute_name_id: { type: integer,
foreignTable: sf_simple_user_profile_attribute_name, foreignReference:
id }
created_at:
updated_at:
sf_simple_user_profile_attribute_name_value_map:
_attributes: { phpName:
sfSimpleUserProfileAttributeNameValueMap }
id:
attribute_name_id: { type: integer,
foreignTable: sf_simple_user_profile_attribute_name, foreignReference:
id }
attribute_value_id: { type: integer,
foreignTable: sf_simple_user_profile_attribute_value,
foreignReference: id }
created_at:
updated_at:
sf_simple_user_profile_attribute_member_name_value_map:
_attributes: { phpName:
sfSimpleUserProfileAttributeMemberNameValueMap }
id:
profile_id: { type: integer,
foreignTable: sf_simple_user_profile_member, foreignReference: id }
attribute_name_id: { type: integer,
foreignTable: sf_simple_user_profile_attribute_name, foreignReference:
id }
attribute_value_id: { type: integer,
foreignTable: sf_simple_user_profile_attribute_value,
foreignReference: id }
created_at:
updated_at:
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---