[Hibernate-JIRA] Commented: (HHH-1123) Cannot put more than 1000 elements in a InExpression
by Siddharth Shankar (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123?page=c... ]
Siddharth Shankar commented on HHH-1123:
----------------------------------------
Hi, Any idea as to when the fix would be incorporated into hibernate and made available for the users?
> Cannot put more than 1000 elements in a InExpression
> ----------------------------------------------------
>
> Key: HHH-1123
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 rc2, 3.2.0.alpha1
> Environment: Oracle 9i
> Reporter: Alexis Seigneurin
> Assignee: Strong Liu
> Attachments: Animal.hbm.xml, hibernate-inexpression-oracle-3.2.patch, LongInElementsTest.java, patch.txt
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The number of elements that we can put in a "in" expression is limited to a certain amount (1000 for Oracle, for instance). When creating a criteria query, the org.hibernate.criterion.InExpression class should split the expression into several smaller ones.
> Attached is a patch which splits the expression by slices of 500 elements. For example, if we have 1001 elements to put in the "in" expression, the result would be :
> (entity.field in (?, ?, ?...) or entity.field in (?, ?, ?...) or entity.field in (?))
> The surrounding parantheses are useful to avoid problems with other conditions (a "and" condition taking over the one of the "or" conditions).
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-5835) Error/Bug getting PluralAttribute on SessionFactoyImpl using @Inheritance and @MappedSuperclass
by Francisco Philip (JIRA)
Error/Bug getting PluralAttribute on SessionFactoyImpl using @Inheritance and @MappedSuperclass
-----------------------------------------------------------------------------------------------
Key: HHH-5835
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5835
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.5
Environment: testcase java6-sun
Reporter: Francisco Philip
Hi, I'm looking an attribute by name root.get("nameOfCollection"), but i think that we have a limitation or bug because if the entity inheritance of this collection they don't resolve correctly the name of "role" to call a getCollectionPersister method of SessionFactory.
Example
{noformat}
@MappedSuperclass
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn( name = "dtype")
class c{
@CollectionOfElements
private Collection<EmbeddedEntity> nameOfCollection;
....
}
@Entity
EntityA extends AbstractEntity{
}
@Entity
EntityB extends AbstractEntity{
@CollectionOfElements
private Collection<EmbeddedEntity> nameOfCollection2;
}
{noformat}
if I call root.get("nameOfCollection") of they cant find it because de variable role is resolved as "AbstractEntity.nameOfCollection", meantime the collectionPersisters have stored EntityA.nameOfCollection, EntityB.nameOfCollection and EntityB.nameOfCollection2
this is a bug?
SessionFactoryImpl.java
{noformat}
public CollectionPersister getCollectionPersister(String role) throws MappingException {
CollectionPersister result = (CollectionPersister) collectionPersisters.get(role);
if (result==null) {
throw new MappingException( "Unknown collection role: " + role );
}
return result;
}
{noformat}
AbstractManagedType.java
{noformat}
@SuppressWarnings({ "unchecked" })
public Attribute<? super X, ?> getAttribute(String name) {
Attribute<? super X, ?> attribute = declaredAttributes.get( name );
if ( attribute == null && getSupertype() != null ) {
attribute = getSupertype().getAttribute( name );
}
return attribute;
}
{noformat}
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-5390) Index column on inverse List should throw a warning
by Chris Bredesen (JIRA)
Index column on inverse List should throw a warning
---------------------------------------------------
Key: HHH-5390
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5390
Project: Hibernate Core
Issue Type: Improvement
Components: annotations
Affects Versions: 3.5.3
Reporter: Chris Bredesen
The manual correctly warns against trying to map an indexed inverse collection on a List. However, a configuration containing this invalid mapping builds successfully but causes null values to be inserted for the index column.
Hibernate should be helpful and, if possible, throw a warning to the user (perhaps an error?) that explains the invalid combination. Here is an example that would run but produce invalid results:
@Entity
public class Parent {
@OneToMany(mappedBy="parent")
@OrderColumn(name="order")
private List<Child> children;
}
@Entity
public class Child {
@ManyToOne
private Parent parent;
}
The above is a typical one to many with the addition of @OrderColumn. Because Child owns the relationship, the index column is lost/ignored. Hibernate should warn about 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, 11 months