[Hibernate-JIRA] Commented: (HHH-1481) any mapping with composite id-type does not work
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1481?page=c... ]
Gail Badner commented on HHH-1481:
----------------------------------
Is this still an issue using 3.6.0?
> any mapping with composite id-type does not work
> ------------------------------------------------
>
> Key: HHH-1481
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1481
> Project: Hibernate Core
> Issue Type: Patch
> Affects Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.0 beta 3, 3.0 beta 4, 3.0 rc 1, 3.0 final, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1 beta 1, 3.1 beta 2, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.2.0.alpha1, 3.1.3
> Environment: Hibernate 3.1.2
> Reporter: Michael Matt
> Attachments: patch.zip
>
> Original Estimate: 10m
> Remaining Estimate: 10m
>
> Any mapping with composite id-type throws MappingException 'property mapping has wrong number of columns'.
> The zipped patch file contains:
> -bugfix for AnyType.java
> - testcases any mapping with simple id-type and composite id-type
--
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] Commented: (HHH-1481) any mapping with composite id-type does not work
by Leandro Subils (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1481?page=c... ]
Leandro Subils commented on HHH-1481:
-------------------------------------
I need it fixed for an important project. Any chance it can be solved soon?
> any mapping with composite id-type does not work
> ------------------------------------------------
>
> Key: HHH-1481
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1481
> Project: Hibernate Core
> Issue Type: Patch
> Affects Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.0 beta 3, 3.0 beta 4, 3.0 rc 1, 3.0 final, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1 beta 1, 3.1 beta 2, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.2.0.alpha1, 3.1.3
> Environment: Hibernate 3.1.2
> Reporter: Michael Matt
> Attachments: patch.zip
>
> Original Estimate: 10m
> Remaining Estimate: 10m
>
> Any mapping with composite id-type throws MappingException 'property mapping has wrong number of columns'.
> The zipped patch file contains:
> -bugfix for AnyType.java
> - testcases any mapping with simple id-type and composite id-type
--
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: (HBX-1173) hbm2ddl generates bad sql schema when forbidden column name is used on Oracle
by Lorber Sebastien (JIRA)
hbm2ddl generates bad sql schema when forbidden column name is used on Oracle
-----------------------------------------------------------------------------
Key: HBX-1173
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1173
Project: Hibernate Tools
Issue Type: Improvement
Environment: 16:04:20,778 INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.3.0.GA
16:04:20,789 INFO org.hibernate.cfg.Environment - Hibernate 3.2.7
16:04:20,808 INFO org.hibernate.cfg.Environment - hibernate.properties not found
16:04:20,812 INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib
16:04:20,815 INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
+ Oracle / H2 (tests)
Reporter: Lorber Sebastien
Priority: Minor
Hello,
It's not a major issue but anyway it made me wonder some minutes what was the problem.
I used this in an entity:
@Enumerated(EnumType.STRING)
@Column(name = "size", nullable=false)
public ImageSize getImageSize() {
return imageSize;
}
Hbm2ddl generates:
create table NWS_PICTURE (
news_id varchar2(36 char) not null,
size varchar2(255 char) not null,
path varchar2(255 char) not null,
picture_id number(19,0),
primary key (picture_id)
);
but i can't pass that on Oracle:
create table NWS_PICTURE (
news_id varchar2(36 char) not null,
size varchar2(255 char) not null,
path varchar2(255 char) not null,
picture_id number(19,0),
primary key (picture_id)
)
Erreur à la ligne de commande : 3, colonne : 8
Rapport d'erreur :
Erreur SQL : ORA-00904: : invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Because size is a keyword, it doesn't work.
Wouldn't it be better to make it fail fast and not generate the SQL schema in these cases?
I don't know if it is specific to oracle. If it is, perhaps adding a comment above the generated sql create table, or a warning in the hbm2ddl process?
It seems ok when using H2, i was able during tests to retrieve data from this table.
--
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-5856) Update only saves back changes
by Darren S. Eyers (JIRA)
Update only saves back changes
------------------------------
Key: HHH-5856
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5856
Project: Hibernate Core
Issue Type: New Feature
Components: core
Environment: N/A
Reporter: Darren S. Eyers
When a record is saved back to the database all the fields are sent back to the database. If one was going to do SQL instead they would just update the columns that have changed. This means at the moment all columns are updated/sent back to the DB which affects performance in both the DB and network.
Wondering if there is any way possible to record which fields have been changed. Thinking maybe something could be done with AOP, but looks like extra variables/parameters would be needed.
On save there could be an extra version of save which has a boolean or list of fields that have changed and then only update those fields.
--
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-3332) Hibernate duplicate then child entity's on merge
by Rodrigo de Assumpção (JIRA)
Hibernate duplicate then child entity's on merge
------------------------------------------------
Key: HHH-3332
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3332
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.6
Environment: JDK 1.6
Oracle 9i
Hibernate 3.2.6
Hibernate Annotations 3.3.1
Hibernate EntityManager 3.3.2
Standalone Running
Reporter: Rodrigo de Assumpção
Priority: Critical
The method merge from EntityManager causes a duplication of child entity's.
class Father:
@OneToMany(mappedBy = "father", cascade={CascadeType.ALL}, fetch=FetchType.LAZY)
private List<Child> childList;
class Child:
@ManyToOne @JoinColumn(name = "ID_FATHER")
private Father father;
class BugTest
EntityManagerFactory emf = Persistence.createEntityManagerFactory("JpaTestHB");
EntityManager em = emf.createEntityManager();
Father f = (Father) em.createQuery("SELECT f FROM Father f WHERE f.id = 1").getSingleResult();
Child c = new Child();
c.setFather(f);
f.getChildList().add(c);
em.getTransaction().begin();
em.merge(f);
em.getTransaction().commit();
The execution of BugTest Class causes tow insert's on table "child".
If you change the fetch mode to EAGER (into Father class) the problem not occurs.
I make the same test with Toplink, and it make a unique insert, normal.
--
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: (JPA-9) Incorrect Generics signature for javax.persistence.criteria.CriteriaBuilder.SimpleCase<C, R>
by Rodolfo Hansen (JIRA)
Incorrect Generics signature for javax.persistence.criteria.CriteriaBuilder.SimpleCase<C, R>
--------------------------------------------------------------------------------------------
Key: JPA-9
URL: http://opensource.atlassian.com/projects/hibernate/browse/JPA-9
Project: Java Persistence API
Issue Type: Bug
Affects Versions: 1.0.0
Reporter: Rodolfo Hansen
Priority: Critical
if the CriteriaBuilder's signature for selectCase is:
<C, R> SimpleCase<C, R> selectCase(Expression<? extends C> expression);
then the SimpleCase's methods must also be:
SimpleCase<C, R> when(Expression<? extends C> condition, R result);
SimpleCase<C, R> when(Expression<? extends C> condition, Expression<? extends R> result);
instead of what is currently exposed.
The code is otherwise correct as the following double cast does work:
final SimpleCase<Expression<Double>, Double> consumecase =
(SimpleCase<Expression<Double>, Double>) (Object) cb.selectCase(onTime);
--
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