Steve and I discussed today that making the SQM model completely immutable isn't going to work. Since {{EntityPersister}}s might have some SQM expressions attached that are exposed one way or another, we need to make sure that we serve copies of the SQM expressions as callers might mutate the expressions.
Potential options * A BaseNode interface with a standardized clone method => every node knows how to clone itself * Visitation (which has the _drawback_ that it has N*2 method calls because of the double dispatch) |
|