[Hibernate-JIRA] Created: (HSEARCH-539) Add Indexing Support(out of the box) For Simple Collections, Like Set<Integer>
by Zach Kurey (JIRA)
Add Indexing Support(out of the box) For Simple Collections, Like Set<Integer>
------------------------------------------------------------------------------
Key: HSEARCH-539
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-539
Project: Hibernate Search
Issue Type: New Feature
Components: mapping
Affects Versions: 3.2.0.Final
Environment: N/A
Reporter: Zach Kurey
>From both the documentation and the Hibernate Search In Action book it was unclear to me that simple collections were not able to be indexed out of the box by just adding a @IndexEmbedded or @Field annotation, and instead require a custom field bridge. When I say simple collection I mean Sets/Lists/Collections of Integer/Double/String/Float/etc. It would seem, given the already advanced indexing support in Hibernate Search, that this really should be a basic out of the box feature as I'm sure most of the folks using Search have had to implement such a bridge at some point.
Note that I could still be missing an non-obvious feature or there may be a good reason for not providing it via @IndexEmbedded or @Field automatically.
To be completely clear I have:
@CollectionOfElements
@JoinTable(name="enrollment_groups", joinColumns={@JoinColumn(name="enrollee_id")})
@Column(name="enrollment_group_id")
@IndexedEmbedded
private Set<String> utilityEnrollmentGroups;
If I were to change this to a group of embedded types, everything gets indexed just fine.
For Hibernate libraries in use I have:
Core: 3.5.2
Search: 3.2.0
--
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
13 years, 2 months
[Hibernate-JIRA] Created: (HHH-4580) Possible Sybase bug causes AssertionFailure in QueryByExampleTest
by Strong Liu (JIRA)
Possible Sybase bug causes AssertionFailure in QueryByExampleTest
-----------------------------------------------------------------
Key: HHH-4580
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4580
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-2, 3.5.0.Beta-1, 3.3.2, 3.2.4.sp1
Environment: sybase 15
Reporter: Strong Liu
Test QueryByExampleTest.testJunctionNotExpressionQBE fails due to a possible bug in Sybase 15. The same test passes for Sybase 12.5. The test expects two records as a result for a query, but it gets 3. After some debugging with the query that Hibernate generated, I end up with these two simpler ones:
select id from Componentizable where not (name like ? and subName1 like ?)
select id from Componentizable where not (name like 'hibernate' and subName1 like 'ope%')
The first one returns three records, while the second returns two. The interesting part is that if I replace the first parameter in the first query by a hardcoded value ("hibernate"), it still returns 3 records. That means that the problem is probably with the binding of JDBC parameters containing a wildcard % .
--
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
13 years, 2 months
[Hibernate-JIRA] Created: (ANN-814) OneToOne Unidirectional Support
by Rachit (JIRA)
OneToOne Unidirectional Support
-------------------------------
Key: ANN-814
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-814
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.4.0.GA
Environment: Oracle 10g, Java 1.5
Reporter: Rachit
Priority: Blocker
I tried hard for unidirectional OneToOne mapping as below:
@Entity
@Table(name = "PARTY")
public class Party{
private Person person;
private String key;
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL,)
@PrimaryKeyJoinColumn(name = "PARTY_ID", referencedColumnName = "PERSON_PARTY_ID")
public Person getPerson() {
return person;
}
public void setPerson(Person person) {
this.person = person;
}
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@Column(name = "PARTY_ID", nullable = false)
public String getKey() {
return key;
}
private void setKey(String key) {
this.key = key;
}
}
and it is one-to-one mapped to Person as:
@Entity(name = "Person")
@Table(name = "PERSON")
public class Person {
private String key;
@Id
@Column(name = "PERSON_PARTY_ID")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
Now in Person, I deliberately dont have sysUUID as generated as then it generates a unique value for person and the association gets lost. With this mapping hibernate throws the following exception :
Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): Person.
I read and saw constrained="true" being used in mapping files, which I couldnt use as there is no attribute like it in OneToOne annotation.
Please help me out on this
--
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
13 years, 2 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
13 years, 2 months
[Hibernate-JIRA] Created: (HHH-5731) Javassist Enhancement fails when JPA Entity has an attribute named "handler"
by Jan Van Bulck (JIRA)
Javassist Enhancement fails when JPA Entity has an attribute named "handler"
----------------------------------------------------------------------------
Key: HHH-5731
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5731
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.5
Environment: Hibernate 3.5.5 (I observed the problem in JBoss AS 6 M4 and M5)
(Database MySQL)
Reporter: Jan Van Bulck
I have an Entity called {{HandlerError}}, refering to another Entity called {{Handler}}
The getter {{getHandler()}} causes following problem when I deploy the application to JBoss 6 AS *M4*
{code}
15:49:37,306 ERROR [BasicLazyInitializer] Javassist Enhancement failed: c.u.p.model.HandlerError: java.lang.RuntimeException: duplicate method: getHandler in c.u.p.model.HandlerError_$$_javassist_11
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:509) [javassist.jar:6.0.0.20100721-M4]
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:486) [javassist.jar:6.0.0.20100721-M4]
at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:422)
...
Caused by: javassist.bytecode.DuplicateMemberException: duplicate method: getHandler in c.u.p.model.HandlerError_$$_javassist_11
at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:637) [javassist.jar:6.0.0.20100721-M4]
...
15:49:37,311 WARN [PojoEntityTuplizer] could not create proxy factory for:com.unifiedpost.payments.model.HandlerError: org.hibernate.HibernateException: Javassist Enhancement failed: c.u.p.model.HandlerError
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:170) [:3.5.2-Final]
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66) [:3.5.2-Final]
{code}
The same code works well in JBoss 6 AS *M3*.
||JBoss 6 Release||Javassist dependency||
|M3 |javassist-3.11.0.GA.jar|
|M4 |javassist-3.12.1.GA.jar|
|M5 |javassist-3.12.1.GA.jar|
|20101112 |javassist-3.12.1.GA.jar|
In between M3 and M4, following issue has been 'fixed': [JASSIST-97|https://jira.jboss.org/browse/JASSIST-97]
Not sure if it's related, but it looks close given the [patch|https://jira.jboss.org/secure/attachment/12332449/JASSIST-97.patch]
--
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
13 years, 2 months
[Hibernate-JIRA] Created: (HHH-2225) NPE when eager fetching joined component with native SQL query
by Christian Bauer (JIRA)
NPE when eager fetching joined component with native SQL query
--------------------------------------------------------------
Key: HHH-2225
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2225
Project: Hibernate3
Type: Bug
Components: query-sql
Versions: 3.2.0.ga
Reporter: Christian Bauer
Priority: Minor
Item -> many-to-one -> User -> joined component -> billingAddress
This:
result = session.createSQLQuery("select {i.*}, {u.*}, {ba.*} from ITEM i" +
" join USERS u on i.SELLER_ID = u.USER_ID" +
" left join BILLING_ADDRESS ba on u.USER_ID = ba.USER_ID" +
" where u.USERNAME = :uname")
.addEntity("i", Item.class)
.addJoin("u", "i.seller")
.addJoin("ba", "u.billingAddress")
fails with:
java.lang.NullPointerException
at org.hibernate.loader.DefaultEntityAliases.<init>(DefaultEntityAliases.java:37)
at org.hibernate.loader.custom.sql.SQLQueryReturnProcessor.generateCustomReturns(SQLQueryReturnProcessor.java:283)
at org.hibernate.loader.custom.sql.SQLCustomQuery.<init>(SQLCustomQuery.java:129)
at org.hibernate.engine.query.NativeSQLQueryPlan.<init>(NativeSQLQueryPlan.java:43)
at org.hibernate.engine.query.QueryPlanCache.getNativeSQLQueryPlan(QueryPlanCache.java:114)
at org.hibernate.impl.AbstractSessionImpl.getNativeSQLQueryPlan(AbstractSessionImpl.java:137)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:150)
--
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
13 years, 2 months
[Hibernate-JIRA] Created: (HHH-5297) Hibernate JPA closes XAConnection on Glassfish v3 with JDBC Wrapping
by Radosław Smogura (JIRA)
Hibernate JPA closes XAConnection on Glassfish v3 with JDBC Wrapping
--------------------------------------------------------------------
Key: HHH-5297
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5297
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Final
Environment: Glassfish v 3
Reporter: Radosław Smogura
Priority: Critical
In EJB application at 90% the Hibernate closes original physicall connectiont o XA database. This problem occurs when JDBC Object wrapping is turned on in Glassfiah admin console.
This bug is "upstream" of this https://glassfish.dev.java.net/issues/show_bug.cgi?id=11846.
Orginal initial comment, and some comments:
----------------------
I use PostgreSQL 8.4 with trunk and stable driver. When I use statement caching
with wrapping original objects I got exception that statement is closed. My
investigation shwn close of original Polled Connection in
com.sun.gjc.spi.ManagedConnection.transactionCompleted. Problem disappears
after few calls of same statement. This problem doesn't occurs when wrapping is
turned off. In both cases I use XA poll.
Caused by: org.postgresql.util.PSQLException: Statement has been closed.
at
org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:448)
at $Proxy227.clearParameters(Unknown Source)
at
com.sun.gjc.spi.base.PreparedStatementWrapper.clearParameters(PreparedStatementWrapper.java:380)
at
com.sun.gjc.spi.base.PreparedStatementWrapper.close(PreparedStatementWrapper.java:755)
at
org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:563)
-----------------
This problem isn't visible if PooligDatasource is used.
-----------------
I used 3.5.2 Release and it's looks same. Before 1st submiting bug I
thought that this is GF problem, becasue in EJB I was trying to get
XAConnection by resource injection and same problem occured (this EJB was mixed
Hibernate + JDBC), but now i'm going to point that this is Hibernate problem.
I'll do some other checks, and if this will be Hibernate problem I'll fill bug
in Hib.
I created application without Hibernate (old plain JNDI) and it looks that
there is no error - so this coud be hibernate. But i want to do more test,
about this (eg. take XAConnection from server global JNDI, without
java:comp/env).
-----------------
---
Kind regards,
Radosław Smogura
http://www.softperience.eu
--
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
13 years, 2 months