[Hibernate-JIRA] Commented: (HHH-1134) subclass tag with discriminator in one to many mapping
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134?page=c... ]
Gail Badner commented on HHH-1134:
----------------------------------
Could this be related to HHH-4953?
> subclass tag with discriminator in one to many mapping
> ------------------------------------------------------
>
> Key: HHH-1134
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Environment: hibernate 3.0.5, Oracle
> Reporter: Dilip Ranjith
>
> Consider the following hbm.xml file
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping
> >
> <class
> name="DCDTO"
> table="ACCDC"
> dynamic-update="true"
> >
> <id
> name="ID"
> type="java.lang.String"
> >
> <column
> name="DCINFOID"
> />
> <generator class="sequence">
> <param name="sequence">DSEQ</param>
> <!--
> To add non XDoclet generator parameters, create a file named
> hibernate-generator-params-DebtorCreditorDTO.xml
> containing the additional parameters and place it in your merge dir.
> -->
> </generator>
> </id>
> <discriminator
> column="accountType"
> not-null="true"
> type="java.lang.String"
> force="true"
> insert="true"
> />
> <property
> name="creditMax"
> type="java.lang.Double"
> update="true"
> insert="true"
> column="creditMax"
> />
> <subclass
> name="CDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="C"
> >
> </.subclass>
> <subclass
> name="DDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="D"
> >
> </.subclass>
> </class>
> </hibernate-mapping>
> DCDTO is the super class while DDTO and CDTO are its child classes
> If in a mapped object say TDTO there are a set of CDTOs and a separate set of DDTOs
> when we get TDTO the where clause "where accountType='D' " is not there when the query for set of DDTOs are generated. so instead of a set of DDTOs i am getting a set of both DDTO's and CDTO's
--
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
15 years, 11 months
[Hibernate-JIRA] Commented: (HHH-1134) subclass tag with discriminator in one to many mapping
by HG (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134?page=c... ]
HG commented on HHH-1134:
-------------------------
Well force="true" will solve the issue, but not if you use second level cache. While fetching the entity from a cache hibernate does not care if the force is true or not, simply because of the fact that discriminator information is not present in the CacheKey used by hibernate.
What can we do to have to have the same behaviour as "force='true'" with second level cache :( ???
> subclass tag with discriminator in one to many mapping
> ------------------------------------------------------
>
> Key: HHH-1134
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1134
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Environment: hibernate 3.0.5, Oracle
> Reporter: Dilip Ranjith
>
> Consider the following hbm.xml file
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping
> >
> <class
> name="DCDTO"
> table="ACCDC"
> dynamic-update="true"
> >
> <id
> name="ID"
> type="java.lang.String"
> >
> <column
> name="DCINFOID"
> />
> <generator class="sequence">
> <param name="sequence">DSEQ</param>
> <!--
> To add non XDoclet generator parameters, create a file named
> hibernate-generator-params-DebtorCreditorDTO.xml
> containing the additional parameters and place it in your merge dir.
> -->
> </generator>
> </id>
> <discriminator
> column="accountType"
> not-null="true"
> type="java.lang.String"
> force="true"
> insert="true"
> />
> <property
> name="creditMax"
> type="java.lang.Double"
> update="true"
> insert="true"
> column="creditMax"
> />
> <subclass
> name="CDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="C"
> >
> </.subclass>
> <subclass
> name="DDTO"
> dynamic-update="true"
> dynamic-insert="true"
> discriminator-value="D"
> >
> </.subclass>
> </class>
> </hibernate-mapping>
> DCDTO is the super class while DDTO and CDTO are its child classes
> If in a mapped object say TDTO there are a set of CDTOs and a separate set of DDTOs
> when we get TDTO the where clause "where accountType='D' " is not there when the query for set of DDTOs are generated. so instead of a set of DDTOs i am getting a set of both DDTO's and CDTO's
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HV-324) Default annotation not executing when group selector activated
by Marc Schipperheyn (JIRA)
Default annotation not executing when group selector activated
--------------------------------------------------------------
Key: HV-324
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-324
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Affects Versions: 4.1.0.Beta1
Reporter: Marc Schipperheyn
Assignee: Hardy Ferentschik
Attachments: RegistrationVO.java
When you call the validate function with a non-default group selector active, the default constraints do not execute. AFAIC this is unexpected behaviour. Default constraints by their very nature should always execute. Also, since it's very easy to exclude default execution by applying a non-default group selector.
If this is in fact a design decision then the documentation should make very, *very* clear (e.g. through one of those "Notes": Default constraints do NOT execute when a group selector is active! If you want the default to be executed, also add Default.class to the set of group selectors you specify) that default constraints do not execute when a group constraint is active. It doesn't at the moment and I was caught by surprise.
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-5232) Use intern() to reuse strings and reduce memory usage / save 6%
by Yves Galante (JIRA)
Use intern() to reuse strings and reduce memory usage / save 6%
----------------------------------------------------------------
Key: HHH-5232
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5232
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.6
Environment: Hibernate 3.6.0-SNAPSHOT
Linux x86_64 Bits
Reporter: Yves Galante
Priority: Minor
Attachments: DuplicateString.patch
This patch is an update of JIRRA HHH-3924 for Hibernate 3.6.
Testsuite executed without new failures.
Resume of the original JIRRA HHH-3924 :
>>DefaultEntityAliases suffix and rowIdAliases String fields are not interned as are other fields in the class. This leads to significant >>of memory usage on our application.
>>BasicLoader suffixes and QueryLoader sqlAliasSuffixes can also be interned so as to save more memory
See the detailed result of this patch :
========================================
Test conditions
========================================
Hibernate version : 3.6.0-SNAPSHOT
Yourkit : 8.0
OS : Linux x86_64 Bits.
Test case : org.hibernate.test.legacy.ParentChildTest.testReplicate()
Time : Memory snapshot is taken at the of the test.
========================================
Result before patch
========================================
SessionFactoryImpl size : 3939 KB
Duplicates String example :
"0_" : 452 duplicates (32KB)
"rowid_0_" : 405 duplicates (32KB)
"1_" : 145 duplicates (10KB)
"rowid_1_" : 130 duplicates (10KB)
...
"fee3_" : 65 duplicates (5KB)
"glarch1_" : 55 duplicates (5KB)
...
"foo2_2_5" : 46 duplicates (3KB)
...
"string" : 28 duplicates (2KB)
========================================
Result after patch
========================================
SessionFactoryImpl size : 3688 KB
Save 251 Kb, 6% of the session factory size.
--
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
15 years, 11 months