[Hibernate-JIRA] Created: (ANN-711) Maven pom.xml of annotations 3.3.1.GA depends on hibernate-commons-annotations 3.0.0.ga instead of 3.3.0.ga
by Geoffrey De Smet (JIRA)
Maven pom.xml of annotations 3.3.1.GA depends on hibernate-commons-annotations 3.0.0.ga instead of 3.3.0.ga
-----------------------------------------------------------------------------------------------------------
Key: ANN-711
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-711
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.1.GA
Reporter: Geoffrey De Smet
I could be wrong, but it looks very strange to me that the latest hibernate annotations 3.3.1.GA doesn't depend on the latest hibernate-commons-annotations 3.3.0.ga.
<project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<packaging>jar</packaging>
<version>3.3.1.GA</version>
...
<dependencies>
...
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.0.0.ga</version>
</dependency>
...
</dependencies>
</project>
If it is intended, please add a note in the pom.xml:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.0.0.ga</version> <!-- Not 3.3.0.ga because ... -->
</dependency>
The same issue occurs for hibernate-entitymanager.
Also, it's confusing to use "...ga" and "...GA" with a different case-sensitivity in the version number.
--
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, 10 months
[Hibernate-JIRA] Created: (ANN-724) @Size(min) fails in PostLoad
by Albert Gorski (JIRA)
@Size(min) fails in PostLoad
----------------------------
Key: ANN-724
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-724
Project: Hibernate Annotations
Issue Type: Bug
Components: validator
Affects Versions: 3.3.0.ga
Environment: hibernate 3.2.6.ga, hibernate-annotations 3.3.1.ga, hibernate-commons-annotations 3.0.0.ga, hibernate-entitymanager 3.3.1.ga, hibernate-validator 3.0.0.ga
Linux (PClinuxOS), MySQL 5.x
Reporter: Albert Gorski
I've standard parent-child mapping.
In parent I set validation for the childList list for minimum 1 and maximum 4 (max is not a problem)
I create then a Parent and add Child to childCollection (one child added).
When I call validation
new ClassValidator<Person>(Person.class).getInvalidValues(myPerson);
I see no exception/message - all is fine.
The problem appears when I call entityManager.merge(myPerson) - there is an information that minimum child number is 1.
I think it is a problem in PostLoad -> Parent entity is persisted and validated in PostLoad. Child entries are not yet persisted and it leads to exception.
Is it possible to disable automatic validation in PostLoad or general when I want to validate manually?
Is there any way around?
Parent-children classes:
@Entity
@Table(name = "parent")
public class Parent {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy ="parent")
@Fetch(value = FetchMode.SUBSELECT)
@OptimisticLock(excluded = true)
@Size(min = 1, max = 4)
private List<Child> childList = new java.util.Vector<Child>(4, 1);
}
@Entity
@Table(name = "child")
public class Child extends AbstractEntity {
/** Serial UID. */
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@ManyToOne(fetch = FetchType.LAZY)
@NotNull
private Parent parent;
}
--
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, 10 months
[Hibernate-JIRA] Created: (ANN-727) AccessType not being inherited correctly when using @CollectionOfElements
by Kenny MacLeod (JIRA)
AccessType not being inherited correctly when using @CollectionOfElements
-------------------------------------------------------------------------
Key: ANN-727
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-727
Project: Hibernate Annotations
Issue Type: Bug
Components: binder
Reporter: Kenny MacLeod
Priority: Minor
Attachments: BugTestCase.java
See attached test case.
To summarise, I have two @Entity classes, one of which contains a single @Embeddable ComponentA, the other of which contains a @CollectionOfElements of ComponentA. ComponentA in turn contains an instance of the @Embeddable ComponentB.
Both @Entity classes have the @Id on an instance field, so I understand that means that all embedded components should inherit that access type.
The test works fine for the @Entity which contains the single instance of ComponentA, but fails with an exception with the @Entity which contains the @CollectionOfElements. For some reason, the access type behaviour is lost when it gets to ComponentB - but only when I use @CollectionOfElements.
If I explicitly annotate ComponentB with @AccessType("field"), it works fine - but I shouldn't have to.
--
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, 10 months
[Hibernate-JIRA] Created: (ANN-745) @Where annotation is not processed with "Extra-lazy" loading
by Gregory Klimov (JIRA)
@Where annotation is not processed with "Extra-lazy" loading
------------------------------------------------------------
Key: ANN-745
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-745
Project: Hibernate Annotations
Issue Type: Bug
Reporter: Gregory Klimov
Priority: Minor
Consider code:
public class Transaction {
...
@OneToMany
@Fetch(FetchMode.SUBSELECT)
@LazyCollection(LazyCollectionOption.EXTRA)
@Where(clause = "entity=4")
@JoinColumn(name = "entity_id")
private List<Alert> alerts;
...
}
public class Alert {
...
@Any(metaColumn = @Column(name = "entity"), fetch = FetchType.LAZY)
@AnyMetaDef(
idType = "long",
metaType = "integer",
metaValues = {
@MetaValue(value = "4", targetEntity = Document.class),
@MetaValue(value = "9", targetEntity = Transaction.class)})
@JoinColumn(name = "entity_id", insertable = false, updatable = false)
private Object relatedObject;
...
}
produces wrong SQL on size retrieval operation:
select
count(id)
from
alerts
where
entity_id =?
--
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, 10 months