support configurable strategy for "format HQL" function in HQL editor
---------------------------------------------------------------------
Key: HBX-876
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-876
Project: Hibernate Tools
Type: New Feature
Versions: 3.2beta8
Reporter: Joseph Marques
use the HQL editor to mock up new JPQL statements, and then copy and paste them from there
over into some @NamedQuery definition on the appropriate class. Persons responsible for
maintaining multiple back-end codebases, or those motivated individuals that have personal
projects on the side, might have to adhere to multiple code conventions across these
different bases. In order to facilitate more control in this arena, which I believe would
also add significant value to the tool, the HQL editor could support formatting statements
based on a configurable strategy. Here are some suggestions:
1) Alias with "AS" - yes / no - determines whether all aliases should have
"AS" inserted before it, if missing, or not
2) Captialization - ALLCAPS / allsmall / Firstletter
3) Relationship syntax - legacy / modern - determine whether inner joins shoudl be
"IN (obj.relationships) rel" / "INNER JOIN obj.relationships rel
4) Explicit inner/outer - yes/no - determine whether the optional "inner" and
"outer" keywords should be part of the formatted hql/jpql
But that's just to start. In an ideal world, every part of the formatting would be
configurable (similar to how Eclipse offers extermely flexible code formatting)
including:
* before / after / or both before & after what hql/jpql keywords the statement should
break to the next line
* whether aliases should be automatically introduced (when they don't exist) for
better readability
--
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