This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » User management plugins » [SOLVED] Is it posible to combine sfGuardUser with my own User entity?
[SOLVED] Is it posible to combine sfGuardUser with my own User entity? [message #100199] Tue, 01 June 2010 20:06 Go to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Hi all,

I have in my schema.yml my own User with some relations with another entities.
I used it before knowing sfDoctrineGuardPlugin, and I would like to know if it posible combine both because this plugin supply a lot of things.
Now, I have in my \doctrine\schema.yml:
sfGuardUserProfile:
  inheritance:
    type: simple
    extends: sfGuardUserProfileBasis
  # Don't forget this!
  relations:
    User:
      class: sfGuardUser
      foreign: id
      local: user_id
      type: one
      onDelete: cascade
      foreignType: one
      foreignAlias: Profile


and in sfForkedDoctrineApplyPlugin's schema.yml.
sfGuardUserProfileBasis:
  actAs:
    Timestampable: ~
  tableName: sf_guard_user_profile
  columns:
    user_id:
      type: integer(4)
      notnull: true
    email:
      type: string(80)
      notnull: true
      unique: true
    firstname:
      type: string(30)
    lastname:
      type: string(70)
    #TODO! Should be used by task that will erase all validate fields created x days ago and not used.
    validate_at:
      type: timestamp
    validate:
      type: string(33)


I'm not be able to combine it, I've tried a lot of things but when I do:
symfony doctrine:build --all --and-load --no-confirmation

I always get errors.

Someone could help me please??
Thanks a lot.

[Updated on: Thu, 10 June 2010 00:22]

Re: Is it posible to combine sfGuardUser with my own User entity? [message #100350 is a reply to message #100199 ] Thu, 03 June 2010 17:28 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Hi,
I'm going to try explain better my problem.
This is my ER model:
http://img199.imageshack.us/img199/5169/myer.jpg

This is sfDoctrineGuardPlugin+sfForkedDoctrineApplyPlugin ER model:
http://img535.imageshack.us/img535/8194/pluginser.jpg

The problem is that I want to mix both because there are redundant user entities (Usuario and sf_guard_user).
The question is: how can I create relations between my ER diagram and plugins ER diagram? When I try to do it all my attempts fail...

Thanks a lot.


P.S: I attach my schema.yml.

  • Attachment: schema.yml
    (Size: 4.37KB, Downloaded 61 time(s))

Re: Is it posible to combine sfGuardUser with my own User entity? [message #100698 is a reply to message #100199 ] Thu, 10 June 2010 00:21 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

I solved it creating a new own schema.yml and redefining the Doctrine of the plugins schemes at the end of my schema.

For example, adding relations with my own entities and sfGuardUSer and sfGuardGroup...., so I deleted my own user and now I use sfGuardUser.

Hope this helps!
Re: [SOLVED] Is it posible to combine sfGuardUser with my own User entity? [message #100782 is a reply to message #100199 ] Fri, 11 June 2010 11:09 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I don't know about sfForkedDoctrineApplyPlugin, and I can't see your ERD as your image host is blocked by my firewall. But in answer to the question in the title, could you make your own user entity a "profile" table? This has been around in sfGuardPlugin (Propel) for years, so would imagine the same is offered by the Doctrine version.


Remember Palestine
Previous Topic:sfGuardUser form template
Next Topic:Look for a full user guide for User Management Plugins
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software