Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.2
    • Component/s: Behaviors
    • Labels:
      None
    • Environment:
      Symfony 1.4.1 LAMP

      Description

      I've the same problem than this post : http://groups.google.com/group/doctrine-user/browse_thread/thread/3737fd293fef5fda/d86a8bc2578e4bac

      Then, I've set "uniqueBy: [name, type] ", and my data goes in database BUT they can have the same slug.

      So I can't retrieve an objects wich has equal slug with another.

      The column aggregation inheritance does'nt take care of others slugs.

        Activity

        Hide
        Klemens Ullmann-Marx added a comment -

        Here's an improved patch with a better algorithm to find the column aggregation inhertiance base class:

        http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/Sluggable.patch?rev=3067

        This fixes my problem (see above)

        Show
        Klemens Ullmann-Marx added a comment - Here's an improved patch with a better algorithm to find the column aggregation inhertiance base class: http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/Sluggable.patch?rev=3067 This fixes my problem (see above)
        Hide
        Ivar Nesje added a comment -

        Hmm.. I'm sory that my ugly fix to remove the 'where type = $type' part of the query to find existing slugs that might cause a colission with the proposed slug.

        Does anyone have a better idea on how to ask for all slugs in the same model? I had a pretty hard time traversing the inheritance tree to find the right parent class that were not abstract. I see that something similar has been done about soft delete, so that a new record would not get the same slug as a record marked as deleted, but not removed from the databse.

        Show
        Ivar Nesje added a comment - Hmm.. I'm sory that my ugly fix to remove the 'where type = $type' part of the query to find existing slugs that might cause a colission with the proposed slug. Does anyone have a better idea on how to ask for all slugs in the same model? I had a pretty hard time traversing the inheritance tree to find the right parent class that were not abstract. I see that something similar has been done about soft delete, so that a new record would not get the same slug as a record marked as deleted, but not removed from the databse.
        Show
        Klemens Ullmann-Marx added a comment - This fix breaks my system. @see: http://groups.google.com/group/doctrine-dev/browse_thread/thread/8028e51d5bde27eb
        Hide
        Jonathan H. Wage added a comment -

        Thanks for the issue and patch.

        Show
        Jonathan H. Wage added a comment - Thanks for the issue and patch.
        Hide
        Ivar Nesje added a comment -

        Updated the patch a little, so that it does not try to instanciate an abstract class as doctrine generates them.

        I was walking up the inheritance tree and tried to instanciate the class right under DoctrineRecord unfortunatly in symfony there is many layers of abstract classes before you find the base class. Now the plugin walks back to the highes not abstract class

        Show
        Ivar Nesje added a comment - Updated the patch a little, so that it does not try to instanciate an abstract class as doctrine generates them. I was walking up the inheritance tree and tried to instanciate the class right under DoctrineRecord unfortunatly in symfony there is many layers of abstract classes before you find the base class. Now the plugin walks back to the highes not abstract class

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Pierre B
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: