[Hibernate-JIRA] Commented: (ANN-381) Make possible to specify an @EmbeddedId's field in a @OneToMany's mappedBy property
by satish (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-381?page=co... ]
satish commented on ANN-381:
----------------------------
can you please let me know if this patch has been applied to hibernate-annotations 3.4.0.GA and hibernate-core 3.3.0 SP1, or when will this be applied?
I am not able get it working with hibernate-annotations 3.4.0.GA and hibernate-core 3.3.0 SP1, if I use 3.2.0.cr2((core annotations)) as suggested i loose features in hibernate-annotations 3.4.0.GA and hibernate-core 3.3.0 SP1, please help.
Thank you
> Make possible to specify an @EmbeddedId's field in a @OneToMany's mappedBy property
> -----------------------------------------------------------------------------------
>
> Key: ANN-381
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-381
> Project: Hibernate Annotations
> Issue Type: Improvement
> Components: binder
> Environment: Hibernate's annotations packaged in JBoss EJB 3.0 RC8- FD
> Microsoft SQL Server 2000
> Reporter: Pierre Fourès
> Fix For: 3.2.0.cr2
>
>
> As described in hibernate forum (http://forum.hibernate.org/viewtopic.php?t=960763) and discussed with Emmanuel, it would be very nice to be able to specify in an @OneToMany's mappedBy property the field of an @EmbeddedId.
> For example, i would like to be able run this example :
> @Entity
> public class Card {
> @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, mappedBy="primaryKey.card")
> private Set<CardField> fields;
> }
> @Entity
> public class CardField implements Field {
> @EmbeddedId
> private PrimaryKey primaryKey = new PrimaryKey();
>
> @Embeddable
> class PrimaryKey implements Serializable {
> @ManyToOne(optional = false)
> private Card card;
>
> @ManyToOne(optional = false)
> private Key key;
> }
> }
> @Entity
> public class Key {}
--
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, 6 months
[Hibernate-JIRA] Created: (HHH-4031) Outofmemory error in hibernate persisten set
by Shripad (JIRA)
Outofmemory error in hibernate persisten set
--------------------------------------------
Key: HHH-4031
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4031
Project: Hibernate Core
Issue Type: Bug
Environment: Oracle 10.
Reporter: Shripad
Priority: Blocker
I am getting outofmemory error in my java application. On analyzing heapdump of the application , I find that presistent set object of hibernate is consuming nearly 1 GB heapspace.
Following are the mapping files I am using. EMSDataRecord class holds above mentioned set containing objects of EventRecords( Mapping file for this is pasted below EMSDataRecord). Primary key for EMSDataRecord is RECORD_ID. There is one to many relation in EMSDataRecord and EventRecord. I checked in the database. For one entry of EMSDataRecord , there are not more than 2 entries of EventRecords. So there is no reason why the set should be so huge. Is this a bug in hibernate?
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class
name="EMSDataRecord"
table="EM1_RECORD"
dynamic-update="true"
>
<id
name="RecordId"
type="java.lang.Long"
column="RECORD_ID"
>
<generator class="assigned" />
</id>
<!-- Please do not change the order of the fields CR005-->
<property
name="StreamName"
type="java.lang.String"
column="STREAM_NAME"
update="false"
/>
<property
name="OriginatingSystem"
type="java.lang.String"
column="ORIGINATING_SYSTEM"
update="false"
/>
<property
name="DestinationSystem"
type="java.lang.String"
column="DESTINATION_SYSTEM"
update="false"
/>
<property
name="LayoutName"
type="java.lang.String"
column="LAYOUT_NAME"
update="false"
/>
<property
name="ErrorCode"
type="java.lang.String"
column="ERROR_CODE"
update="false"
/>
<property
name="ErrorDesc"
type="java.lang.String"
column="ERROR_DESC"
update="false"
/>
<property
name="ErrorTimestamp"
type="java.util.Date"
column="ERROR_TIMESTAMP"
update="false"
/>
<property
name="EventTimestamp"
type="java.util.Date"
column="EVENT_TIMESTAMP"
update="false"
/>
<property
name="ResolutionStatus"
type="java.lang.Integer"
column="RESOLUTION_STATUS"
/>
<property
name="ResolutionReason"
type="java.lang.Integer"
column="RESOLUTION_REASON"
/>
<property
name="RecordStatus"
type="java.lang.Integer"
column="RECORD_STATUS"
/>
<property
name="LockStatus"
type="java.lang.Integer"
column="LOCK_STATUS"
/>
<property
name="RejectionRemark"
type="java.lang.String"
column="REJECTION_REMARK"
/>
<property
name="AssignmentRuleId"
column="ASSIGNMENT_RULE_ID"
type="java.lang.Long"
/>
<property
name="CorrectionRuleId"
column="CORRECTION_RULE_ID"
type="java.lang.Long"
/>
<property
name="GroupId"
type="java.lang.Long"
column="GROUP_ID"
/>
<property
name="UserId"
type="java.lang.Long"
column="USER_ID"
/>
<property
name="TeamId"
type="java.lang.Long"
column="TEAM_ID"
/>
<property
name="RecordType"
type="java.lang.Integer"
column="RECORD_TYPE"
/>
<!-- Performance Improvement - Save Without BLOB Change - Added additional attribute to make the attribute read only-->
<property
name="FieldsMap"
type="binary"
column="FIELD_MAP"
update="false"
/>
<property
name="LastUpdTimeStamp"
type="java.util.Date"
column="LAST_UPD_TIMESTAMP"
insert="false"
/>
<set name="EventRecords" lazy="false" cascade="none" inverse = "true" where = "event_type=504">
<key>
<column name="RECORD_ID" />
</key>
<one-to-many class="EventRecord"/>
</set>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class
name="EventRecord"
table="EM1_EVENT"
>
<id
name="EventId"
type="java.lang.Long"
column="EVENT_ID"
unsaved-value="any"
>
<generator class="sequence">
<param name="sequence">SEQ_EVENT_ID</param>
</generator>
</id>
<property
name="RecordId"
type="java.lang.Long"
column="RECORD_ID"
update="false"
/>
<property
name="EventType"
type="java.lang.Integer"
column="EVENT_TYPE"
update="false"
/>
<property
name="ChangedField"
type="java.lang.String"
column="CHANGED_FIELD"
update="false"
/>
<property
name="OldValue"
type="java.lang.String"
column="OLD_VALUE"
update="false"
/>
<property
name="NewValue"
type="java.lang.String"
column="NEW_VALUE"
update="false"
/>
<property
name="ChangeTimestamp"
type="java.util.Date"
column="CHANGE_TIMESTAMP"
update="false"
insert="false"
/>
<property
name="UserId"
type="java.lang.Long"
column="USER_ID"
update="false"
/>
<property
name="ChangeReason"
type="java.lang.Integer"
column="CHANGE_REASON"
update="false"
/>
</class>
</hibernate-mapping>
--
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, 6 months