XF 2.0 Finder with liked content?

Jaxel

Well-known member
I'm trying to get a list of media that a user has liked... Could I do the following query with the entity/finder system?
Code:
SELECT xf_liked_content.*, EWRmedio_media.*
FROM xf_liked_content
    INNER JOIN EWRmedio_media ON (EWRmedio_media.media_id = xf_liked_content.content_id)
WHERE xf_liked_content.content_type = 'ewr_medio_media'
    AND xf_liked_content.like_user_id = ?
LIMIT 30
This one seems to be a bit more troublesome because of the way the like handlers work.
 
I was hoping there was some sort of specify finder settings with the LikedContent entity, so I wouldn't have to extend built in entities.
 
There is also the issue of it being a TO_MANY relationship... which doesn't work in XF2.
 
There is also the issue of it being a TO_MANY relationship... which doesn't work in XF2.
Read yolo’s code again. If you extend the LikedContent entity with a relation to your own entity, then that’s a TO_ONE relationship because each LikedContent entry belongs to one media entry.


Fillip
 
Back
Top Bottom