[Hibernate-JIRA] Created: (HHH-5554) Customise column aliasing scheme
by Chris Pheby (JIRA)
Customise column aliasing scheme
--------------------------------
Key: HHH-5554
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5554
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.6.0.Beta4
Reporter: Chris Pheby
Attachments: alias-patch.patch
Currently, the column aliasing scheme is hardcoded in the method public String getAlias(Dialect dialect) of the Column class. Essentially, this constructs an alias by creating a prefix using any characters up to the first non-letter character in the column name. This is usually followed by '_' and a number for disambiguation.
I am working with a legacy database where many columns share common prefixes such as 'CUS_', 'COL_'. These mean all the aliases end up being the same for many columns, making queries difficult to debug.
This patch configures aliasing via Dialect, which was already being done for getMaxAliasLength(). This makes it possible to customise the behaviour by extending the Dialect being used. It does not otherwise change the standard behaviour.
--
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
13 years, 2 months
[Hibernate-JIRA] Created: (HV-589) Consider keeping a constant placeholder instead of the full memory model for classes not indexed
by Emmanuel Bernard (JIRA)
Consider keeping a constant placeholder instead of the full memory model for classes not indexed
------------------------------------------------------------------------------------------------
Key: HV-589
URL: https://hibernate.onjira.com/browse/HV-589
Project: Hibernate Validator
Issue Type: Improvement
Components: engine
Affects Versions: 4.3.0.Final
Reporter: Emmanuel Bernard
Andrej Golovnin wrote:
> After updating JBoss 7 to use the Hibernate Validator 4.3.0 and
> adding <property name="javax.persistence.validation.mode" value="NONE"/>
> to our persistence.xml file I was able to reduce memory consumption
> of SerializableValidatorFactory from ca. 90MB to ca. 256KB. :-)
> What I was not able to do, is to avoid loading of Hibernate Validator
> and Hibernate Envers at all as we don't use them.
Emmanuel's reply
If you do not use Hibernate Validator annotations, 90MB might indeed be too much :) Hardy, I wonder if we could optimize the memory model and JPA initialization so that we check if a class has constraints and if it does not, Hibernate Validator keeps a small placeholder to remember that but does not consume any other memory for this non validated class. We could save a lot instead of building the model and keeping it in memory.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months