Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API inconsistency with getQuery method #283

Closed
rodfersou opened this Issue Oct 16, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@rodfersou
Copy link
Member

commented Oct 16, 2015

With archetypes we have two methods:

  • getQuery: returns a list of CatalogContentListingObject
  • getRawQuery: returns a list of dict

With dexterity we have just one method:

  • getQuery: returns a list of dict
@hvelarde

This comment has been minimized.

Copy link
Member

commented Oct 16, 2015

@pbauer we are talking about the Collection content type here

@thet

This comment has been minimized.

Copy link
Member

commented Oct 24, 2015

@rodfersou getQuery in archetypes return a list of plone.app.contentlisting objects? That's actually something I would expect for a results API method, or not?
-- clarification -- only considereing the API method names, I expect getQuery to return the query, and something like results to return the results. getQuery returning the results feels wrong.

IMO, Dexterity doesn't have to be API compatible with Archetypes. I'd go for a better API instead of staying compatible - the compatibility is lost in many places anyways. Addons have to adapt to support both.

@hvelarde

This comment has been minimized.

Copy link
Member

commented Oct 26, 2015

@thet I don't agree and this is the kind of decisions that make the life of add-on developers more difficult. it would be way easier just to add a getRawQuery method to plone.app.contenttypes and problem solved.

for the rest of the API, it has to be discussed on a broader level. I agree we can enhance it, but we can't come out with a broken API and expect every single add-on developer waste time figuring out "solutions" and implementing then in different ways on every add-on.

@davilima6

This comment has been minimized.

Copy link
Member

commented Oct 26, 2015

I agree with you both so +1 for adding a deprecated method.

@jensens jensens closed this in #289 Nov 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.