[Hibernate-JIRA] Created: (HHH-3197) subquery is not valid SQL when select type is same as parent sql select type
by Nicolai Marck Ødum (JIRA)
subquery is not valid SQL when select type is same as parent sql select type
----------------------------------------------------------------------------
Key: HHH-3197
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3197
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.6
Environment: Java 1.5.0_14
JBoss 4.2.2.GA (Hibernate 3.2.1) - I have also tried with Hibernate 3.2.6.ga, hibernate-annotations-3.3.1.GA and hibernate-entitymanager-3.3.2.GA with same result.
PostgreSQL 8.3.0
WindowsXP
Reporter: Nicolai Marck Ødum
The following ejb3 QL:
"Delete FROM Notification noti WHERE noti NOT IN (SELECT subNoti.notifications FROM SubscriberNotification subNoti)"
Result in the following sql
"delete from Notification where id not in (select . from SubscriberNotification subscriber1_, SubscriberNotification_Notification notificati2_, Notification notificati3_ where subscriber1_.id=notificati2_.SubscriberNotification_id and notificati2_.notifications_id=notificati3_.id)"
notice the "select . from" in the subquery
if I alter the sql to be
"delete from Notification where id not in (select notificati3_.id from SubscriberNotification subscriber1_, SubscriberNotification_Notification notificati2_, Notification notificati3_ where subscriber1_.id=notificati2_.SubscriberNotification_id and notificati2_.notifications_id=notificati3_.id)"
I have not been able to create a workaround.
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (ANN-636) Add the annotations to map the User Collection Type
by jason (JIRA)
Add the annotations to map the User Collection Type
---------------------------------------------------
Key: ANN-636
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-636
Project: Hibernate Annotations
Issue Type: New Feature
Components: binder
Environment: n/a
Reporter: jason
I am searching a way from the Hibernate Annotation to map the user defined collection, and find out the following :
Can anybody let me know what the status for this? or how i can map the user collection type by hibernate annotation, thanks
Add an annotation to specify the UserCollectionType for a OneToMany or ManyToMany.
The annotation is named CollectionTypeInfo, perhaps better named UserCollectionType, but I didn't know the standards for naming classes.
The change to AnnotationBinder is minor and is delineated by '//dwsjoquist//' comment lines.
Usage:
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinColumn(name = "id")
@CollectionTypeInfo(name = "examples.MyUserCollectionType")
public List<ExampleAttribute> getExampleAttributes() {
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HHH-3365) SchemaUpdate still fails if conflicting table is visible in another user's tablespace
by John Wood (JIRA)
SchemaUpdate still fails if conflicting table is visible in another user's tablespace
-------------------------------------------------------------------------------------
Key: HHH-3365
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3365
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.3.0.CR1, 3.2.6, 3.1
Reporter: John Wood
Priority: Minor
This issue is a duplicate of HHH-2208. Despite what that other issue states, this doesn't seem to be fixed.
This issue still seems to a problem for us when using the SchemaUpdate tool to auto-update our tables (in Oracle).
We've tried this using the following hibernate versions: 3.1, 3.2.6ga, 3.3.0.CR1
In every case the bug still happens: the schema update tool tries to update a table called "JOB", finds a table in someone else's schema (which happens to have been made public), and then gets confused. It will either try to update the other user's JOB table, or (in our case), fails because it (quite rightly) doesn't have permissions to change the other user's table.
Here is how to reproduce:
1) Create your main DB user as normal (user1)
2) Create another user on the Oracle same database (user2)
3) On user2 create a new table which conflicts with a table in your generated DB ("job").
4) Make this new table visible to user1. One way of doing this is to give "insert" privildeges to "public":
grant insert on user2.job to public
5) Run the schema update tool for user1. This will fail: it tries to update the table in user2's schema (tablespace), and doesn't have permissions.
Note that this issue only occurs when the conflicting table is visible to user1: if the table was hidden (i.e. user1 had no visibility of the conflicting table), we would be OK.
It seems to me that either A) there is some confusion about when this issue was fixed, or B) this is a different issue to HHH-2208
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (EJB-365) Can't execute query
by Radosław Smogura (JIRA)
Can't execute query
-------------------
Key: EJB-365
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-365
Project: Hibernate Entity Manager
Issue Type: Bug
Affects Versions: 3.3.2.GA
Environment: Hibernate 3.2.6
PostrgreSQL 8.0.13
Glassfish
Reporter: Radosław Smogura
Priority: Critical
Execution followed named query with followed entity
@Entity
@NamedQuery(name="Foo.test",
query="SELECT f FROM Foo f WHERE ((:bool IS NULL) OR (f.bool = :bool)) ")
public class Foo implements Serializable{
@Id
int id;
boolean bool;
public boolean isBool() {
return bool;
}
public void setBool(boolean bool) {
this.bool = bool;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
and parameter bool = null
causes PostgreSQL error ERROR: operator does not exist: boolean = bytea
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HSEARCH-221) Get Lucene Analyzer runtime (indexing)
by Kenneth Christensen (JIRA)
Get Lucene Analyzer runtime (indexing)
--------------------------------------
Key: HSEARCH-221
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-221
Project: Hibernate Search
Issue Type: Improvement
Affects Versions: 3.0.1.GA
Reporter: Kenneth Christensen
Attachments: AddLuceneWork.java, DocumentBuilder.java, Flyer.java, LuceneWorker.java, TestBean.java
I'm writing a multi-language application and I have choose to use Hibernate Search.
But it looks like Hibernate Search have some limitations in multi-language applications.
I need to use the SnowballAnalyzer and create the instance at runtime because I only know the language at runtime.
It really looks like Hibernate Search don't support runtime created analyzers for entity instances.
I have extended Hibernate Search to support the above issue - maybe you could include the code in Hibernate Search or implement something similarly.
I really need this feature/improvement :-)
Please see attached files.
Flyer - Entity used in test
TestBean - SessionBean used in test
org.hibernate.search.backend.impl.lucene.LuceneWorker - Added code to support entity instance analyzer, see performWork(AddLuceneWork work, DirectoryProvider provider) and add(Class entity, Serializable id, Document document, DirectoryProvider provider, Analyzer analyzer).
org.hibernate.search.backend.AddLuceneWork - Added code to support analyzer.
org.hibernate.search.engine.DocumentBuilder - Added code to support entity instance analyzer, see addWorkToQueue(Class entityClass, T entity, Serializable id, WorkType workType, List<LuceneWork> queue, SearchFactoryImplementor searchFactoryImplementor).
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HHH-2787) Criteria Aggregate Projections do not JOIN additional tables on which restrictions apply
by Sami Dalouche (JIRA)
Criteria Aggregate Projections do not JOIN additional tables on which restrictions apply
----------------------------------------------------------------------------------------
Key: HHH-2787
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2787
Project: Hibernate3
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.2.5
Environment: PostgreSQL Dialect
Reporter: Sami Dalouche
Priority: Critical
Hi,
When you have a Criteria Object, on which you :
- Add Aggregate Projections such as rowCount()
- createAlias("whatever").add(Restrictions.*..)
It looks like that the "whatever" table is NOT joined, even though it is joined OK when the projections are not there.
So, here is an approximate Unit test that should throw an exception (I couldn't create a complete test case since I couldn't get the unit tests to run on my machine -any link explaining this step somewhere ?):
Criteria c1 = s.createCriteria(Enrolment.class)
.setProjection( Projections.projectionList().add(Projections.rowCount(), "rowCount") );
Criteria studentCriteria = c1.createAlias("student", "st");
studentCriteria.add(Restrictions.eq("name", "whatevername"));
It should complain saying the "st.name" alias does not exist, because the student class has not been joined.
Regards,
Sami Dalouche
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (ANN-730) Still incorrect FK circularity errors
by Lars Heyden (JIRA)
Still incorrect FK circularity errors
-------------------------------------
Key: ANN-730
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-730
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.1.GA
Environment: Hibernate 3.2.6.ga, HEM3.3.2.ga, HAN3.3.1.ga,
JSE 1.6, DB2 8.2
Reporter: Lars Heyden
Attachments: cyclic-test.zip
This bug is related to ANN-694 (and some other issues).
Correctly mapped JoinedSubclasses still get reported to have circularities in their FKs which is not the case.
To reproduce the bug at least four entity classes must be in a joined class hierarchy. As in ANN-694 there is a workaround by renaming the tables to force another processing order.
I've provided a small test case:
It consists of four entities ClassA, ClassB, ClassC and ClassD mapped with InheritanceType.JOINED to the tables "class_a", "class_b", "class_c" and "class_1d". Because ClassD maps to table "class_1d" it gets processed first by the circularity check which raises the error.
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (ANN-686) SubClass with EmbeddedId or IdClass containing @ManyToOne fail at startup
by Marcos Sousa (JIRA)
SubClass with EmbeddedId or IdClass containing @ManyToOne fail at startup
-------------------------------------------------------------------------
Key: ANN-686
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-686
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.1.beta1, 3.3.0.ga
Reporter: Marcos Sousa
Priority: Minor
I subclass Customer that has a EmbeddedId using JOIN inheritance strategy. My embeddable class has @ManyToOne relationship. Look the classes:
Pesson class:
@Entity
@Table(name="person")
public class Person {
@Id
private Integer personId;
private String name;
}
Embeddable class ID.
@Embeddable
public class PersonPk implements Serializable {
@ManyToOne(optional=false,
cascade={CascadeType.PERSIST,
CascadeType.REFRESH,
CascadeType.REMOVE}, fetch=FetchType.EAGER)
@JoinColumn(name="personId")
private Person person;
// ... getters and setters
}
CustomerClass:
@Entity
@Table(name="Customer")
@Inheritance(strategy=InheritanceType.JOINED)
public class Customer {
@Id
private PersonPk pk = new PersonPk();
}
Regional Custumer:
@Entity
@Table(name="AmericanCustomer")
@PrimaryKeyJoinColumn(name="personId")
@IdClass(PessoaPk.class)
public class AmericanCustomer extends Customer {
// some american customer fields..
}
This mapping throw this exception at hibernate startup:
Invocation of init method failed; nested exception is java.util.NoSuchElementException
Caused by:
java.util.NoSuchElementException
at java.util.AbstractList$Itr.next(Unknown Source)
at org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53)
at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:463)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:501)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:282)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:918)
--
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
17 years, 4 months