OrderBy string getting dumped to console on session factory creation
--------------------------------------------------------------------
Key: HHH-5064
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5064
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Final
Reporter: Shawn Clowater
Priority: Trivial
I noticed the following when firing our app up the first time after updating to 3.5 final
{code}
orderByFragment(order-by)
sortSpecification({sort specification})
sortKeySpecification(sort key)
sortKey($PlaceHolder$.DISPLAY_ORDER)
< sortKey(null)
< sortKeySpecification(asc)
orderingSpecification(asc)
< orderingSpecification(null)
< sortSpecification(null)
< orderByFragment(null)
{code}
Tracing through the debugger leads me to the AbstractCollectionPersister
{code}
if ( hasOrder ) {
ColumnMapper mapper = new ColumnMapper() {
public String[] map(String reference) {
return elementPropertyMapping.toColumns( reference );
}
};
sqlOrderByStringTemplate = Template.renderOrderByStringTemplate(
collection.getOrderBy(),
mapper,
factory,
dialect,
factory.getSqlFunctionRegistry()
);
}
{code}
the Template.renderOrder call eventually creates an OrderByFragmentTranslator which calls
{code}
GeneratedOrderByFragmentRenderer renderer = new GeneratedOrderByFragmentRenderer();
try {
renderer.orderByFragment( parser.getAST() );
}
{code}
The GeneratedOrderByFragmentRenderer makes a call to the traceIn and traceOut methods of
the antlr.TreeParser which seem to be dumping these values to System.out.println()
I do notice that there is an OrderByFragmentRenderer that isn't used by the core code
that seems to override these methods and log the output to log.trace().
Should the GeneratedOrderByFragmentRenderer be using that class instead? It's not
that big of a deal but it is rather ugly at startup.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira