Split ResultTransformer into TupleTransformer and ResultListTransformer

Description

Usages of ResultTransformer were deprecated in 5.2. For 6.0 let's develop the better way to apply this idea, splitting this into 2 distinct functional contracts: TupleTransformer and ResultListTransformer.

There is some uncertainty we need to clarify with regards to how TupleTransformer and RowTransformer play together when the query is "typed".

The "highest level" of transformation is the type defined for a TypedQuery which defines the type of the individual "rows" returned by the Query to the user. This resultType may be:

  1. Object[].class to indicate that an Object[] should be the row type (so-called "pass thru" transformer).

  2. Tuple.class which indicates that the results should be wrapped in a JPA Tuple

  3. Some other value which indicates the expected row type. This is limited to cases where either:

    1. the query defined a single "select expression" and the resultType names the type of that selection

    2. the user supplied a TupleTransformer and the resultType names that TupleTransformer return type.

For example:

Some that we specifically need to decide on:

Environment

None

Activity

Show:
Christoph Dreis
November 15, 2017, 10:14 AM

I'm sorry that I apparently hit a nerve. I'd be very much interested in an article that describes the internal discussions. I'm sure you have your valid reasons, but for me one of the possible aspects of deprecation is superseding something. Which implies that there is something new already. Moving that philosophical discussion aside: I failed to find a roadmap for 6.0, which I'd be happy to move to. Could you shed some light on the rough plans?

Cheers

Steve Ebersole
November 15, 2017, 3:03 PM

Not really a nerve - just saying that I should write up the reasoning in a single location rather than repeating myself over and over. I think that's a pretty valid thing, and just me being lazy (in the good developer way)

The roadmap is where I keep all of the roadmaps:

https://github.com/hibernate/hibernate-orm/wiki (main wiki page) -> https://github.com/hibernate/hibernate-orm/wiki/Roadmap -> https://github.com/hibernate/hibernate-orm/wiki/Roadmap6.0

Christoph Dreis
November 15, 2017, 3:09 PM

Thanks for pointing me to the links. I guess time-wise you can't say anything, can you?

Steve Ebersole
November 15, 2017, 4:18 PM

We don't discuss timelines - too many variables to account for. I can say that contributions help it come faster

Steve Ebersole
December 6, 2018, 3:43 PM

Preparing Alpha1 release

Assignee

Steve Ebersole

Reporter

Steve Ebersole

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure