[hibernate-dev] Re: regarding more human-friendly table alias
Sanne Grinovero <[email protected]>
| Newsgroups | gmane.comp.java.hibernate.devel |
|---|---|
| Message-ID | <CAFm4XO0WKmA_iU00XkkHA4msoH7+RyuG5Cx6i=kWOkfWE6M8Uw@mail.gmail.com> |
Hi Nathan, this sounds worthwhile to me at a high level, but I'm not sure about us being able to implement a reasonable heuristic. In particular, the mentioned "huffman encoding" doesn't sound like an improvement over the current strategy? I suppose you're not referring to the compression algorithm? Maybe I misunderstand, it would help to see a concrete example. Thanks On Wed, 26 Aug 2020 at 14:09, Nathan Xu <[email protected]> wrote: > > My point might have been discussed previously. I beg your pardon if my message bothers you. > > As everybody knows, Hibernate will create very terse and mystic table alias. I often feel frustrated by them when trying to read the SQL Hibernate has produced. There must be many thoughts behind its current design, I think. Could we achieve the goal to avoid sacrificing SQL readability while having our job done? Needless to say, experienced Hibernate user still needs to understand the auto-generated SQL for many reasons (troubleshooting, optimization), and a human-friendly SQL might make for a far better user experience. > > In terms of implementation, we can simulate human's thinking process when designing a table alias (TBH, sometimes even human is frustrated to think of a most satisfying alias). Many heuristics could be applied (e.g., hufman encoding algorithm) and it would be a good selling point for v6. > > Any thoughts? Again, pardon me if the point has been discussed previously. > _______________________________________________ > hibernate-dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s _______________________________________________ hibernate-dev mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s