Closed rodfersou closed 8 years ago
@pbauer we are talking about the Collection content type here
@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.
@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.
I agree with you both so +1 for adding a deprecated method.
With archetypes we have two methods:
getQuery
: returns alist
ofCatalogContentListingObject
getRawQuery
: returns alist
ofdict
With dexterity we have just one method:
getQuery
: returns alist
ofdict