Hi there,

i use sfGuard in a recent project for the first time and am pretty
happy with it, however i ran into an issue id like to sahre with you /
hear your opinion on.

sfGuard has a basic user table and a profile table which i can link
with the user table, for that sfGuard has its own schema.yml file.
Because i thought it would be better to link site content to the
actual user id instead of the profile id i ran into the problem not
being able to link my tables with the sfGuard user table because it
was/is in a different schema file.
Because i design my DB Layout with DBDesigner 4 and use a plugin to
convert it to a schema.yml file i needed to rebuild my DBDesigner file
from the database where everything is already imported and link the
tables again by hand after than. So now i had the sfGuard tabels in my
DBDesigner layout and could link the user table to content tables (eg.
articles.member_id FK from sf_guard_user.id). Everything fine but a
new problem arose.
When exporting this DBDesigner layout symfony recreates the
sfGuardModel files under lib/model/ (which of course default symfony
behaviour). When i call $article->getSfGuardUser() now symfony uses
the model file unter /lib/model and not the plugin files, which of
course is not what i want and wont work because i cant access many of
the methods implemented in the plugin base model.
The only way i figured out to come around this problem is to not
directly join the tables in the DBLayout (so now "official" link
between article.member_id and sf_guard_user.id) and write the
"getSfGuardUser()" method on my own into the model. This works, but
really isnt the kind of solution i have in mind, besides i lose some
innodb features like "ON DELETE CASCADE" which i could rewrite myself
but thats not ideal either.

So how do you solve this problem ? I am at the point where i say it
would be better to leave the sfGuard DB Layout out of my general db
layout and just put my profile table in there and link all the site
content to the profile_id which shouldnt make many problems, even if
its not the real user_id which is registered in the system.

thx in advance for your thoughts.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to