function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SebastianBraunSebastianBraun 

Joining FeedItem and FeedComment SOQL

Hi,

 

im trying to join FeedItem and FeedCommt.

 

In normal SQL I would do it like this:

 

"Select f.Body, c.CommentBody from FeedItem f join FeedComment c on f.Id = c.FeedItemId"

 

Nothing seems to work, so i hope you guys can tell whats wrong with that SOQL-Query:

 

"SELECT CommentBody, FeedItem.Body FROM FeedComment"

 

Thanks in advance

 

Sebastian

Jia HuJia Hu

List<FeedItem> fill = [Select Id, Body, (Select FeedItemId, CommentBody From FeedComments) FROM FeedItem Limit 5];

Vishnu Raj VVishnu Raj V
Hi @Jia Hu, Is there any way to query the Likes from a FeedComment to get the UserId who liked the comment.

Thanks in advance