add support for extra URLs on user-based queries

Create issue
Issue #2216 open
Robert Jäschke created an issue

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().

  1. The corresponding SQL queries need to be identified and the corresponding table needs to be JOINed (outside the innermist JOIN!).
  2. The JOIN should be upon request only, thus, an iBatis conditional snipped needs to be included.
  3. 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)

  1. Robert Jäschke reporter
    • changed status to open

    @nosebrain What do you think about the option with the attribute in the DBLogic to enable the JOIN?

  2. Daniel Zoller

    depends on when you want to enable/disable the join:

    1. 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
    2. 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)
    3. 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 :()

  3. Robert Jäschke 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.

  4. Log in to comment