[Hibernate-JIRA] Created: (HHH-7055) OrphanRemoval does not appear to work
by Cavan Morris (JIRA)
OrphanRemoval does not appear to work
-------------------------------------
Key: HHH-7055
URL: https://hibernate.onjira.com/browse/HHH-7055
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 3.6.10, 3.5.6
Environment: Fedora Linux 15 2.6.41.4-1.fc15.x86_64
Sun Java JDK 1.7.0_01-b08
Apache Maven 3.0.3
MySQL 5.5.18
Reporter: Cavan Morris
Attachments: TestHibernate.tar.gz
A bidirectional, OneToMany User/UserRole relationship is created with orphanRemoval=true. Removing the UserRole from the User and saving the User results in a constrain violation.
Please extract the attached file run runTest2.sh to demonstrate the issue. Read the README.txt file for more information.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[Hibernate-JIRA] Created: (HHH-7054) FetchType.Eager with FetchMode.JOIN leads to infinite loop.
by Cavan Morris (JIRA)
FetchType.Eager with FetchMode.JOIN leads to infinite loop.
-----------------------------------------------------------
Key: HHH-7054
URL: https://hibernate.onjira.com/browse/HHH-7054
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 3.6.10, 3.5.6
Environment: Fedora Linux 15 2.6.41.4-1.fc15.x86_64
Sun Java JDK 1.7.0_01-b08
Apache Maven 3.0.3
MySQL 5.5.18
Reporter: Cavan Morris
Attachments: TestHibernate.tar.gz
A bidirectional, OneToMany User/UserRole relationship is created with FetchType.EAGER and FetchMode.JOIN. Pulling the User object from the database results in an infinite loop of identical SQL statements being run. The process appears to seg fault once memory has been exhausted.
Changing FetchMode to SELECT solves the issue.
Please extract the attached file and read the README.txt file for information on running the test.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[Hibernate-JIRA] Created: (HHH-7053) Extending org.hibernate.id.IdentityGenerator causes wrong DDL
by Rafal Figas (JIRA)
Extending org.hibernate.id.IdentityGenerator causes wrong DDL
-------------------------------------------------------------
Key: HHH-7053
URL: https://hibernate.onjira.com/browse/HHH-7053
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 3.6.10
Environment: MySQL/HSQLDB
Reporter: Rafal Figas
Create class:
public class Generator extends org.hibernate.id.IdentityGenerator
{
}
Use it as generator in hbm mapping file:
<generator class="sample.Generator" ></generator>
It will result in:
1. ID field doesn't get auto_increment attribute (in MySQL).
2. Due to (1) attempt to save entity causes Exception due to: "Field 'IDaccount' doesn't have a default value".
Exception occurs with similar message in HSQLDB as well.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[Hibernate-JIRA] Created: (HSEARCH-682) DSL cannot handle fieldBridge for @IndexEmbedded fields
by Nick Fenwick (JIRA)
DSL cannot handle fieldBridge for @IndexEmbedded fields
-------------------------------------------------------
Key: HSEARCH-682
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-682
Project: Hibernate Search
Issue Type: New Feature
Components: engine
Affects Versions: 3.3.0.Final
Environment: Hibernate 3.6.0, HSearch 3.3.0, Mysql 5.1.52.
Reporter: Nick Fenwick
Discussed in https://forum.hibernate.org/viewtopic.php?f=9&t=1009440, "Re: Correct to use ignoreFieldBridge for "subentity.field" DSL?".
I find I have to set ignoreFieldBridge when querying for a field indexed using @IndexEmbedded, i.e.:
{code}@Entity
class CategoryEntity {
@Column(name="lft")
@Field(name="left", index=Index.UN_TOKENIZED, store=Store.YES)
@FieldBridge(impl=PadNumberBridge.class,
params = { @Parameter(name="pad", value="4") }
)
private int left;
... same for 'right' ...
}
@Entity
class ItemEntity {
@IndexedEmbedded(depth=1)
private CategoryEntity category;
}{code}
results in fields for ItemEntity being stored in the Lucene index like:
{code}
category.left = 0004
category.right = 0012
{code}
To query for these, I cannot do:
{code}
qb.range().onField("category.left").above(4).createQuery()
{code}
I get an exception saying it doesn't know what FieldBridge to use for "category.left". Instead, I can do:
{code}
qb.range().onField("category.left").ignoreFieldBridge().above(4).createQuery()
{code}
but the 'value' is no longer padded according to the FieldBridge that was specified in CategoryEntity for its 'left' attribute, I have to pass value as e.g. "0004".
It would be good to mention this situation in the documentation (5.1.2. "Building a Lucene query with the Hibernate Search query DSL"), at least to specify that it is/isn't supported, so that people attempting this kind of @IndexEmbedded mapping know how to safely build a query for such fields.
--
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, 5 months