[Hibernate-JIRA] Commented: (HHH-1901) Filtering on superclass property problem
by Calin Pavel (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901?page=c... ]
Calin Pavel commented on HHH-1901:
----------------------------------
Just to know: the same behavior can be found in case you want to apply a filter to a set/list/bag that contains simillar structures (superclass-subclass).
> Filtering on superclass property problem
> ----------------------------------------
>
> Key: HHH-1901
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1901
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.1.3
> Environment: Hibernate 3.1.3 on Oracle 9i
> Reporter: Juan Ignacio Cidre
> Attachments: test.tar.gz
>
>
> I have three classes Order, Advertisements and Creatives.
> Advertisements is subclass of Creatives
> Order has a one-to-many to Advertisements
> That one-to-many has a filter. The condition has to do with a property of Creative, the Advertisements superclass.
> This is the Order to Advertisements mapping with a filter on deletionStatusId that is a field of Creative.
> <set name="ads" inverse="true" lazy="true">
> <key column="orderId"/>
> <one-to-many class="com.inceptor.domain.msn.Advertisement"/>
> <filter name="deletionStatusFilter" condition="deletionStatusId = 0"/>
> </set>
> This is the Creative mapping with the deletionStatusId, which is mapped as a component. It is a Enum in Java.
> <component name="deletionStatus"
> class="com.inceptor.domain.core.DeletionStatusType">
> <property name="number" column="deletionStatusId" />
> </component>
> I would expected an sql that appends a where condition like [superclass (Creative) table alias].deletionStatusId instead I received [subclass (Advertisements) table alias].deletionStatusId
> This generates a DB error.
> Follows the generated query
> Note ads0_ instead of ads0_1_
> select ads0_.orderId as orderId1_, ads0_.id as id1_, ads0_.id as ID324_0_, ads0_1_.version as version324_0_, ads0_1_.searchEngineAccountId as searchEn3_324_0_, ads0_1_.creationTime as creation4_324_0_, ads0_1_.creatorId as creatorId324_0_, ads0_1_.modificationTime as modifica6_324_0_, ads0_1_.synchTime as synchTime324_0_, ads0_1_.modifierId as modifierId324_0_, ads0_1_.deletionStatusId as deletion9_324_0_, ads0_1_.deleterId as deleterId324_0_, ads0_1_.pushError as pushError324_0_, ads0_.seId as seId418_0_, ads0_.title as title418_0_, ads0_.description as descript4_418_0_, ads0_.displayURL as displayURL418_0_, ads0_.destinationURL as destinat6_418_0_, ads0_.originalDestinationURL as original7_418_0_, ads0_.orderId as orderId418_0_ from MSN_Advertisements ads0_ inner join GTK_Creatives ads0_1_ on ads0_.id=ads0_1_.ID where ads0_.deletionStatusId = 0 and ads0_.orderId=?
--
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
16 years, 11 months
[Hibernate-JIRA] Created: (HHH-2558) Allow batching inserts for multi-table entities
by Steve Ebersole (JIRA)
Allow batching inserts for multi-table entities
-----------------------------------------------
Key: HHH-2558
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2558
Project: Hibernate3
Issue Type: Improvement
Components: core
Reporter: Steve Ebersole
<joined-subclass/> as well as entity's containing <join/> mappings currently cannot participating in JDBC batching. The reaons being that the actions (i.e. Executables) perform the insert or update in an atomic fashion through the persisters; the persisters perform the multiple statements.
One possible approach for solving would be to have the persisters somehow expose the fact that inserts or updates effect multiple tables and to have the actions drive the executions of those statements.
Another possible approach would be to change how Batcher works. Currently, batcher is capable of tracking a single jdbc batch statement, which it does by string comparison of the sql. So a new sql command is seen as the impetus to start a new batch. So we could change this to make batch a logical concept such that the "grouping" is actually at a higher level : like say "[command]:[entity-name](:[id])". Then we could have batches keyed by "update:Customer:1" rather than "update CUSTOMER set ...". Would need to be very careful in the case of dynamic-insert and dynamic-update...
This is a follow-on to HHH-1
--
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
16 years, 11 months
[Hibernate-JIRA] Commented: (HHH-1233) Allow mixing <union-subclass>and <subclass>
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1233?page=c... ]
Steve Ebersole commented on HHH-1233:
-------------------------------------
The other thing to keep in mind that there are issues with far fewer votes that are actually far more important (and probably visa-versa as well, true). Votes is only one criteria I use for ranking.
> Allow mixing <union-subclass>and <subclass>
> -------------------------------------------
>
> Key: HHH-1233
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1233
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Environment: N/A
> Reporter: Gunther Schadow
>
> BACKGROUND:
> Hibernate allows mixing <subclass> and <joined-subclass> inheritance mappings but apparently not <subclass> and <union-subclass> mappings, however, this seems like the most useful combination. Example:
> USE CASE:
> We may have a hierarchy with very unevenly distributed mass, i.e., some subclasses have millions of objects, others have only a half-dozen. There may be a lot of different subclasses of the smaller sort.
> Union-subclass seems ideal to work with a dozen different humongous tables, as they can be placed on different tablespaces and managed differently. However, for the 200 or so subclasses whith only a dozen objects each, it would be easier to map these into a single table per sub-hierarchy.
> REQUESTED FEATURE:
> Therefore it seems fair to suggest that <subclass> mappings should be supported underneath <union-subclass> mappings. To allow that the <discriminator> element would have to be handled inside a <union-subclass> element and same for the discriminator-value attribute. Perhaps one could limit the complexity by requiring that the outer mapping must be union-subclass and the inner can be subclass but not vica versa?
> WORKAROUNDS:
> As the documentation mentions one could just create several independent <class> hierarchies, thus effectively emulating the first level of union-subclass specializations. But that would not allow specifying polymorphic associations.
> ESTIMATED EFFORT:
> It could be difficult to implement support for this. But would like to know whether this is something that is somewhere on the radar screen for the future.
--
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
16 years, 11 months
[Hibernate-JIRA] Commented: (HHH-1233) Allow mixing <union-subclass>and <subclass>
by Wouter Lievens (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1233?page=c... ]
Wouter Lievens commented on HHH-1233:
-------------------------------------
The argument that it's 14th on the vote list simple states that it's not a trivial, marginal request. I don't think he meant to imply anybody is demanding or requesting anything of you (or anyone else on the team), so there is no reason to ridicule James' last comment.
> Allow mixing <union-subclass>and <subclass>
> -------------------------------------------
>
> Key: HHH-1233
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1233
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Environment: N/A
> Reporter: Gunther Schadow
>
> BACKGROUND:
> Hibernate allows mixing <subclass> and <joined-subclass> inheritance mappings but apparently not <subclass> and <union-subclass> mappings, however, this seems like the most useful combination. Example:
> USE CASE:
> We may have a hierarchy with very unevenly distributed mass, i.e., some subclasses have millions of objects, others have only a half-dozen. There may be a lot of different subclasses of the smaller sort.
> Union-subclass seems ideal to work with a dozen different humongous tables, as they can be placed on different tablespaces and managed differently. However, for the 200 or so subclasses whith only a dozen objects each, it would be easier to map these into a single table per sub-hierarchy.
> REQUESTED FEATURE:
> Therefore it seems fair to suggest that <subclass> mappings should be supported underneath <union-subclass> mappings. To allow that the <discriminator> element would have to be handled inside a <union-subclass> element and same for the discriminator-value attribute. Perhaps one could limit the complexity by requiring that the outer mapping must be union-subclass and the inner can be subclass but not vica versa?
> WORKAROUNDS:
> As the documentation mentions one could just create several independent <class> hierarchies, thus effectively emulating the first level of union-subclass specializations. But that would not allow specifying polymorphic associations.
> ESTIMATED EFFORT:
> It could be difficult to implement support for this. But would like to know whether this is something that is somewhere on the radar screen for the future.
--
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
16 years, 11 months