0
votes

I have a class called Profile that stores information about the user that is specific to the application. This data probably should have been stored in sf_guard_user_profile, but it wasn't designed that way at the time, and it's too late to modify now.

The problem is that in admin generated modules with filters, Doctrine_Core::getTable("profile") gets called and then a separate query on sf_guard_user_profile is performed for every row in profile.

I am looking for way to override the "default" table method in Profile to add a join to sf_guard_user_profile. I have created custom table methods, and that works fine. However, I would rather find a way to force the join in all cases instead of using a specific table_method. This would save me from having to add the table method to every filter throughout the application.

I thought that I might be able to override getInstance() in the ProfileTable class. However, this has no effect. I've also tried overriding findAll() in ProfileTable, which also does not work.

Is there a "default" table method that is used whenever a table method isn't directly specified?

I hope this makes sense.

Thanks!

-Steve

1

1 Answers

0
votes

You should rather try overriding the createQuery() method of the Profile table. This method is called whenever a query is made by the table class so this should do the trick.