Skip to content

Instantly share code, notes, and snippets.

@gbadner
Created November 27, 2013 19:19
Show Gist options
  • Select an option

  • Save gbadner/7681508 to your computer and use it in GitHub Desktop.

Select an option

Save gbadner/7681508 to your computer and use it in GitHub Desktop.
AliasResolutionContext.getSourceAlias()
/**
* Resolve the source alias (select-clause assigned alias) associated with the specified Return. The source
* alias is the alias associated with the Return in the source query.
* <p/>
* The concept of a source alias only has meaning in the case of queries (HQL, Criteria, etc). Not sure we
* really need to keep these here. One argument for keeping them is that I always thought it would be nice to
* base the SQL aliases on the source aliases. Keeping the source aliases here would allow us to do that as
* we are generating those SQL aliases internally.
* <p/>
* Should also consider pushing the source "from clause aliases" here if we keep pushing the select aliases
*
* @param theReturn The Return to locate
*
* @return the alias associated with the specified {@link EntityReturn}.
*/
public String getSourceAlias(Return theReturn);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment