[Hibernate-JIRA] Created: (HBX-951) Folder selection dialog should allow creating a new folder
by Dan Allen (JIRA)
Folder selection dialog should allow creating a new folder
----------------------------------------------------------
Key: HBX-951
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-951
Project: Hibernate Tools
Issue Type: Improvement
Components: eclipse
Affects Versions: 3.2beta9, 3.2beta10
Environment: Eclipse 3.2.2
Hibernate Tools beta10
Reporter: Dan Allen
Attachments: new_folder.png
The folder selection dialog used by the Hibernate Code Generation... definition screen (Main tab, Output directory) does not allow creating new folders. The lack of this feature is very inconvenient.
For instance, if I would like to export my schema to HTML documentation, I go into the tool to setup a new Exporter. But I cannot create a new folder to put the docs. So I have to quit the dialog, go create a new folder using the Eclipse File > New > Folder dialog. Then I have to go back into the tool and configure it to use this folder.
The attached screenshot shows what I am looking for.
--
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
15 years, 1 month
[Hibernate-JIRA] Created: (HHH-2897) Adding support for use of sequence objects in DB2 V8 OS390
by Tobias Sternvik (JIRA)
Adding support for use of sequence objects in DB2 V8 OS390
----------------------------------------------------------
Key: HHH-2897
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2897
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Environment: Hibernate Core 3.2.5ga, DB2 UDB V8 OS390 (Z/OS)
Reporter: Tobias Sternvik
Attachments: DB2390Dialect.java
Since version 8 of DB2 sequence objects are supported on the OS390 platform. But, the syntax for use of sequences varies between OS390 platform and the "rest".
For retreival of next value in DB2 OS390 the syntax is "select nextval for <theSequenceName> from sysibm.sysdummy1" while in the "rest" it is "values nextval for <theSequenceName>". There migt be the case that within AS/400 environment the syntax is imilar to OS390, but I have not verified this.
Also other differences exists..
I've included a enhanced verion of DB2390Dialect.java that has been proven to work in DB2 mainframe environment.
--
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
15 years, 2 months
[Hibernate-JIRA] Created: (ANN-666) @SQLInsert does not work
by Alex (JIRA)
@SQLInsert does not work
-------------------------
Key: ANN-666
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-666
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.1
Environment: hibernate-3.2.3.ga.zip, MySQL client version: 5.0.22, MSSQL 2005
Reporter: Alex
http://forum.hibernate.org/viewtopic.php?p=2367176#2367176
@Entity
@Table(name = "CONTACTS")
@SQLInsert(sql="INSERT INTO CONTACT(FIRST_NAME, LAST_NAME) VALUES(upper('aaa'),upper('bbb'))")
public class Contact {
// ...
}
I've tried the both - sql-query and stored procedure inside the @SQLInsert. But the both not work for me. It looks like the @SQLInsert annotation is just ignored for some reason. Usual "insert into CONTACT (FIRST_NAME, LAST_NAME) values (?, ?)" statement is generated despite of the @SQLInsert annotation. At the same time other annotations (@NamedNativeQuery, @Loader) work ok for the class.
How to make it works, please?
Thanks a lot in advance.
Hibernate version:
hibernate-3.2.3.ga.zip
Mapping documents:
sessionFactory = new AnnotationConfiguration()
.addPackage("model")
.addAnnotatedClass(Contact.class)
.addAnnotatedClass(SpaceShip.class)
.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLMyISAMDialect")
.setProperty("hibernate.connection.url", "jdbc:mysql://localhost/test")
.setProperty("hibernate.connection.driver_class", "com.mysql.jdbc.Driver")
.setProperty("hibernate.connection.username", "usname")
.setProperty("hibernate.connection.password", "1231123")
.setProperty(Environment.HBM2DDL_AUTO, "update")
.setProperty(Environment.SHOW_SQL, "true")
.setProperty("hibernate.cache.provider_class", "org.hibernate.cache.NoCacheProvider")
.buildSessionFactory();
Code between sessionFactory.openSession() and session.close():
session = HibernateUtil.getSession();
session.beginTransaction();
session.saveOrUpdate(newContact);
session.getTransaction().commit();
Full stack trace of any exception that occurs:
None
Name and version of the database you are using:
MySQL client version: 5.0.22
The generated SQL (show_sql=true):
Hibernate: insert into CONTACT (FIRST_NAME, LAST_NAME) values (?, ?)
--
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
15 years, 2 months
[Hibernate-JIRA] Created: (ANN-594) Filters for MappedSuperClass
by Shawn Clowater (JIRA)
Filters for MappedSuperClass
----------------------------
Key: ANN-594
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-594
Project: Hibernate Annotations
Issue Type: New Feature
Components: binder
Affects Versions: 3.3.0.ga
Reporter: Shawn Clowater
Priority: Minor
Based on discussion from
http://forum.hibernate.org/viewtopic.php?t=963539&start=0
Essentially, it would be nice to be able to define filters on a MappedSuperClass and have them 'trickle down' to the subclasses. (at the class level - not sure if property level filters are carried down right now).
I see the MappedSuperClass as a means to define generic behaviour (common columns, etc) and I think it makes sense for the filters to play nicely as well.
In addition, I don' t know if it is already a separate JIRA request, filters off of an Interface would be fantastic as well as our application is using filters heavily and are always looking at ways to reduce the amount of filter annotations that we have to spread around.
Right now, we're either forced to copy filter annotations all over the place OR we've actually been a bit sneaky and have tapped into custom persisters to dynamically apply common filters. However, there is a separate issue based on the order that entity persisters are built.
--
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
15 years, 2 months
[Hibernate-JIRA] Created: (HHH-2412) Hibernate 3 cannot be compiled under JDK 6
by Ahmet A. Akin (JIRA)
Hibernate 3 cannot be compiled under JDK 6
------------------------------------------
Key: HHH-2412
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2412
Project: Hibernate3
Type: Task
Components: core
Versions: 3.2.1, 3.2.2
Environment: windows xp, JDK 6
Reporter: Ahmet A. Akin
Hibernate code cannot be compiled under JDK 6. Problems and possible solutions:
1- org.hibernate.jdbc.ResultSetWrapper implements ResultSet. But in Java 6, there are big changes in Resultset interface, and maybe 20+ more methods needs to be implemented in the ResultSetWrapper class. i would suggest eliminating this wrapper class once and for all, because it is only used in one method (in ColumnNameCache, getIndexForColumnName method) and i dont think there is a justification for using that wrapper class.
2- org.hibernate.lob.SerializableBlob needs to implement new Blob interface methods:
public void free() throws SQLException;
public InputStream getBinaryStream(long pos, long length) throws SQLException
But, if this class is publicly accesible or used by API's back compatibility issues needs to be checked.
3- Same as number 2, org.hibernate.lob.BlobImpl class needs to implement new Blob methods.
4- org.hibernate.lob.SerializableClob class needs to implent new Clob methods.
5- org.hibernate.lob.ClobImpl , same as 4.
In fact, Java 6 has a lot of JDBC improvements, maybe a java6 special extra package can be created., but that is a whole different issue.
--
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
15 years, 2 months
[Hibernate-JIRA] Created: (ANN-593) Ability for an @NamedQuery on a @MappedSuperclass to be copied up to the subclass
by John Newman (JIRA)
Ability for an @NamedQuery on a @MappedSuperclass to be copied up to the subclass
---------------------------------------------------------------------------------
Key: ANN-593
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-593
Project: Hibernate Annotations
Issue Type: Improvement
Components: binder
Affects Versions: 3.2.1
Environment: INFO Version:15 - Hibernate Annotations 3.2.1.GA
09:15:01,755 INFO Environment:500 - Hibernate 3.2.1
INFO SettingsFactory:81 - RDBMS: Microsoft SQL Server, version: 08.00.0760
09:15:06,114 INFO SettingsFactory:82 - JDBC driver: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase, version: 1.2
09:15:06,255 INFO Dialect:151 - Using dialect: org.hibernate.dialect.SQLServerDialect
Reporter: John Newman
If I use a @MappedSuperclass (which is a very useful annotation btw) I have to manually copy any queries I want with taht class up to all subclasses. The binder should check any mapped superclasses and pull those named queries up. i.e.
/**
* Base User class that different projects user classes derive from.
* Hibernate annotations doesn't pick up that query, so you have to copy it up to your subclass
*/
@MappedSuperclass
@NamedQueries({
@NamedQuery(name="User.findByLoginName",
query="FROM User WHERE loginName = ?") // this is useless down here, i just put it here for reference
})
public class BaseUser<PK extends Serializable> extends IdEntity<PK> {
private static final long serialVersionUID = -4443522925041212381L;
protected String loginName;
@Column(unique=true)
public String getLoginName() {
return this.loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
}
/**
* Custom user class for a certain application
*/
@Entity
@Table(name="tbl_user")
@GenericGenerator(name=IdGen.NAME, strategy=IdGen.AUTO)
@NamedQueries({
@NamedQuery(name="User.findByLoginName",
query="FROM User WHERE loginName = ?") // had to copy this up from the base class
})
public class User extends BaseUser<Short> {
private static final long serialVersionUID = -6199544722824321999L;
private String firstName;
...
}
so in short it would be nice if the scanner would check for that and bind any named queries up to the subclass
--
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
15 years, 3 months
[Hibernate-JIRA] Created: (HHH-2326) NullPointerException from merge on composite id
by Greg Adams (JIRA)
NullPointerException from merge on composite id
-----------------------------------------------
Key: HHH-2326
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2326
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.1
Environment: Hibernate 3.2.1ga, tested against Oracle 10g and Derby
Reporter: Greg Adams
Priority: Critical
Attachments: HibernateMergeBug.zip
Merge is throwing an NPE from the bowels of Hibernate when I have a class mapped with a composite ID.
Stacktrace:
[junit] java.lang.NullPointerException
[junit] at org.hibernate.type.AbstractType.getHashCode(AbstractType.java:112)
[junit] at org.hibernate.type.AbstractType.getHashCode(AbstractType.java:120)
[junit] at org.hibernate.type.EntityType.getHashCode(EntityType.java:279)
[junit] at org.hibernate.type.ComponentType.getHashCode(ComponentType.java:189)
[junit] at org.hibernate.engine.EntityKey.generateHashCode(EntityKey.java:104)
[junit] at org.hibernate.engine.EntityKey.<init>(EntityKey.java:48)
[junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:100)
[junit] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:687)
[junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:669)
[junit] at org.hibernate.engine.CascadingAction$6.cascade(CascadingAction.java:245)
[junit] at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
[junit] at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
[junit] at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
[junit] at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
[junit] at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
[junit] at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
[junit] at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
[junit] at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
[junit] at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:437)
[junit] at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:194)
[junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:123)
[junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53)
[junit] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:677)
[junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:661)
[junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:665)
[junit] at com.foo.test.HibernateTest.doMerge(Unknown Source)
[junit] at com.foo.test.HibernateTest.testInsert(Unknown Source)
[junit] at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
[junit] at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
[junit] at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
[junit] at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
[junit] at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
[junit] at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
[junit] at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
[junit] at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
[junit] at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
[junit] at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
[junit] at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:32)
I've attached a zipped-up project that reproduces the error. Just extract and run ant.
--
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
15 years, 3 months