[Hibernate-JIRA] Created: (HSEARCH-662) Re-indexing failure in @IndexedEmbedded entities in @ManyToOne relationship
by Kyrill Alyoshin (JIRA)
Re-indexing failure in @IndexedEmbedded entities in @ManyToOne relationship
---------------------------------------------------------------------------
Key: HSEARCH-662
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-662
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.3.0.Final
Environment: Hibernate 3.6.0
Reporter: Kyrill Alyoshin
Priority: Blocker
Attachments: hibernate_search_bug.zip
What is happening seems to be this:
Let's say we have an @Indexed entity called Son. It has @IndexedEmbedded parent property called Dad in @ManyToOne relationship. Dad is @ContainedIn and has @Field on one of its fields. I am demonstrating a condition when more than one Dads are updated in a single session, only one would be re-indexed, the rest will fail to be re-indexed.
I am attaching a simple IDEA project that clearly demonstrates what is going on. I believe that this is a very serious bug. (Note: I removed hibernate-3.6.0.jar from the lib directory to minimize the size of the zip file under 10M, the rest of the jars are there).
Please run BugDemonstrationTest#showBug test method to see everything.
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-6598) Immutable entities should not have up-to-date checks performed on a flush
by Ian Robertson (JIRA)
Immutable entities should not have up-to-date checks performed on a flush
-------------------------------------------------------------------------
Key: HHH-6598
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6598
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.7, 4.0.0.CR1, 3.2.5
Reporter: Ian Robertson
Attachments: DirtyCheckTest.java
When session.flush() is called, hibernate needs to scan all entities currently in session to see which ones are dirty. In some cases, this can become expensive due to the number of entities, especially since every field of each entity must be inspected. Unfortunately, while hibernate will avoid persisting changes made to an entity annotated with @Immutable, it makes the decision to do so only after invoking the getValues() method on DefaultFlushEntityEventListener (even though this method is invoked *after* making the call to requiresDirtyCheck(entity)).
I'm attaching a test case which demonstrates this behavior.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-4727) Add option to specify foreign key name on table with shared primary key used in one-to-one relationship
by Pavla Nováková (JIRA)
Add option to specify foreign key name on table with shared primary key used in one-to-one relationship
---------------------------------------------------------------------------------------------------------
Key: HHH-4727
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4727
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.3.2
Reporter: Pavla Nováková
There is currently no way to specify (user friendly) foreign key name on table with shared primary key used in One-to-One mapping. The most intuitive way would be to
accept @ForeignKey on property level (see the comment in the code below) or on entity level (similar way to usage in joined inheritance) or last option may be add parameter in foreign generator.
{code}
@Entity
public class ExampleEntity implements Serializable {
@Id
@GenericGenerator(name = "foreign-generator", strategy = "foreign", parameters=@Parameter(name="property", value="parentExampleEntity"))
@GeneratedValue(generator = "foreign-generator")
private Long id;
...
@PrimaryKeyJoinColumn
@OneToOne(fetch=FetchType.LAZY, optional=false)
@org.hibernate.annotations.ForeignKey(name="parent_entity_fk") // this is currently ignored
private ParentExampleEntity parentExampleEntity;
...
}
{code}
--
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
14 years, 7 months