Try our conversational search powered by Generative AI!

Query for comments with attributes

Vote:
 

This might just be me that is being stupid, but it seems to me like theres a design problem with the comment system.

Let's say we extend the concrete Comment class with an attribute. Then we want to query for comments with a certain value for that attribute. However, as CommentQuery maps to IComment and not to Comment we can't do that. That is, we can query for IComments with the attribute but that wont work as the attribute system doesn't know about a Comment being an IComment.

So, instead we extend IComment with the same attribute. Only now we can't set it's value as SetAttributeValue will verify that the type it's invoked on has that attribute, and since it's invoked on a Comment it wont as it's IComment that has the attribute.

If I've missed something, please let me know :) Otherwise this might be a scenario to look at solving in the next version.

#33391
Oct 10, 2009 13:33
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.