[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-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
[Hibernate-JIRA] Created: (EJB-385) JPA method of merge failed to insert deleted records from database
by Hari (JIRA)
JPA method of merge failed to insert deleted records from database
-------------------------------------------------------------------
Key: EJB-385
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-385
Project: Hibernate Entity Manager
Issue Type: Improvement
Components: EntityManager
Affects Versions: 3.2.0.ga
Environment: 3.2.6.ga, Weblogic,JPA, Windows
Reporter: Hari
The following is my requirement.
Suppose i have a record in database with id say, 12.
i have retrieved this using a JPQL query and convert it into a transfer object ,done some processing and going to remerge this after converting it to a new entity but the id set in the new entity is same as old one ie 12.
Now just before calling entityManger.merge i have deleted the record with id 12 from database.
The issue is the merge opeartion is not inserting the record in database at all.
But if the id set in the entity is one which is never occured in the database,the merge operation will insert the record with the id set from teh application.
Is there any work around/fix for this issue.
Regards
Harikrishnan R
--
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-4066) JPA compatibility problem
by Albert Kurucz (JIRA)
JPA compatibility problem
-------------------------
Key: HHH-4066
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4066
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.3.2
Environment: Hibernate Core 3.3.2, problem is independent from database type (actually appeared with Derby 10.4.2)
Reporter: Albert Kurucz
POJO Entity with 100% JPA annotations, as long as the Class did not implement the Map interface everything worked fine (save to and load from database).
After the Class implemented the Map interface, during object persistence, 'get' was called with '$type$' parameter, and 'get' responded with IllegalArgumentException (in accordance to its design).
Workaround implemented: get now responds to this call by returning getClass().getName()
BUT Hibernate should not need this workaround if it is 100% JPA compliant.
On the above example the Map interface of the Entity Class had no connection with persisted variables, only transients.
In the JPA spec there is no restriction what I know of, which would disallow the implementation of Map by an Entity Class.
In the JPA spec there is no requirement what I know of, which would require and Entity Class which implement the Map interface to implement the Map interface in any special way (like 'get' responding to '$type$').
Correct me if I am wrong.
--
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