- changed status to open
add support for extra URLs on user-based queries
Issue #2216
open
The posts returned by queries for the posts of a user (including restrictions to tags) should contain the extra URLs for publications. They are currently only returned by getPostDetails()
.
- The corresponding SQL queries need to be identified and the corresponding table needs to be JOINed (outside the innermist JOIN!).
- The JOIN should be upon request only, thus, an iBatis conditional snipped needs to be included.
- We need a way to tell the dblogic whether the JOIN should be performed or not. One option would be an additional parameter to
getPosts()
, another would be an additional attribute in the DBLogic that can be set, e.g.,dblogic.setEnablePublicationExtraUrls(true)
.
Comments (4)
-
reporter -
depends on when you want to enable/disable the join:
- If you want to enable the extra url join on specific pages (e.g. not on the homepage, but on all user pages not depending if the current page belongs to the logged in user) go with the additional parameter in `getPosts() and let the controller decide if the join should be done
- If you only want to join when the logged in user requests his own posts than add the check into the logic (cf. document handling)
- if you want to enable/disable the join system-wide and add the join to all queries i would go with the
dblogic.setEnablePublicationExtraUrls(true)
(if we would use a document bases database engine, this wouldn't be a problem :()
-
reporter We only want to enable this for the DBLogic instance that is used by the RestServer and there we always want to enable it (for the queries that support it). Therefore, I thought that
dblogic.setEnablePublicationExtraUrls(true)
would cause the least overhead. -
- marked as minor
- Log in to comment
@nosebrain What do you think about the option with the attribute in the DBLogic to enable the JOIN?