[Hibernate-JIRA] Created: (HHH-3327) Allow DDL comment within timestamp (patch included)
by Paul Benedict (JIRA)
Allow DDL comment within timestamp (patch included)
---------------------------------------------------
Key: HHH-3327
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3327
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.6
Reporter: Paul Benedict
Attachments: timestamp-comment.patch.txt
In my corporate environment, the logical names of tables and columns go into our Hibernate mappings. The logical names are represented in DDL comments via the <comment> sub-elements. Unfortunately, the only columns we currently cannot comment are on <timestamp> (element, not type) columns.
The provided patch adds the optional "comment" sub-element to "timestamp" element. I made the following change to Hibernate 3.2.x, ran HBM2DDL, and Hibernate Tools worked as expected. The patch is against the DTD in the svn trunk.
<!ELEMENT timestamp (meta*,comment?)>
If possible, please consider this for 3.3. Thanks.
--
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, 11 months
[Hibernate-JIRA] Created: (HSEARCH-196) ObjectNotFoundException not caught in FullTextSession
by Christian Wiedmann (JIRA)
ObjectNotFoundException not caught in FullTextSession
-----------------------------------------------------
Key: HSEARCH-196
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-196
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.0.1.GA
Environment: Hibernate core 3.2.4.sp1, MySQL 5
Reporter: Christian Wiedmann
Priority: Minor
I am getting an ObjectNotFoundException from FullTextSession when running a query with items in the index that have been deleted from the database. It seems like the intent is not to let this exception be thrown, but the stack trace shows the exception is not being caught in ObjectLoader.load when it is thrown from session.get().
ref: http://forum.hibernate.org/viewtopic.php?p=2384677
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
[com.lawtrust.server.Document#ca533472193932230119394006b0004f]
at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377)
at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:223)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:187)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
at org.hibernate.search.engine.ObjectLoader.load(ObjectLoader.java:27)
at org.hibernate.search.engine.ProjectionLoader.load(ProjectionLoader.java:54)
at org.hibernate.search.query.FullTextQueryImpl.list(FullTextQueryImpl.java:244)
at com.lawtrust.server.bl.spring.service.impl.SearchServiceImpl.find(SearchServiceImpl.java:94)
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-3324) Support many-to-one multiple -property-ref
by Sonix Legend (JIRA)
Support many-to-one multiple -property-ref
------------------------------------------
Key: HHH-3324
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3324
Project: Hibernate3
Issue Type: Improvement
Components: core
Environment: Hibernate 3.2.6ga, Oracle 9.2
Reporter: Sonix Legend
I have a problem in my current project.
For example,
I have a table which name is "A".
create table A
(
...
varchar2(10) a1,
varchar2(10) a2,
...
);
And another table which name is "B".
create table B
(
...
varchar2(10) b1 primary key,
varchar2(10) b2 primary key,
...
);
alter table B add constraint PK_B primary key (b1, b2);
Then I generated two hibernate mapping files by hibernate tools.
A.hbm.xml
...
<class name="A" table="A">
...
<property name="a1" type="string">
<column name="a1" length="10" />
</property>
<property name="a2" type="string">
<column name="a2" length="10" />
</property>
...
</class>
...
B.hbm.xml
...
<class name="B" table="B">
...
<composite-id name="id" class="C">
<key-property name="b1" type="string">
<column name="b1" length="10" />
</key-property>
<key-property name="b2" type="string">
<column name="b2" length="10" />
</key-property>
</composite-id>
...
</class>
...
Now I wanted A "left outer join" B, so I added a "many-to-one" element into "A.hbm.xml".
<many-to-one name="b" class="B">
<column name="a1" />
<column name="a2" />
</many-to-one>
And I added a "one-to-many" element into "B.hbm.xml".
<set name="a">
<key>
<column name="a1" />
<column name="a2" />
</key>
<one-to-many class="A" />
</set>
I writed a HQL.
"select a, b from A as a left outer join a.b as b where a.a1 = 'test1' and a.a2 = 'test2' and (b is null or b.b1 = 'test3')"
When the hibernate loads the mapping files, there was not an error.
But when the query executes, it report a error "column ambiguous defined".
I got the sql that generated from hql by p6spy.
select ... a_0.a1, a_0.a2, a_0.a1, a_0.a2, ... b_0.b1, b_0.b2, ... from ...
So the error wake me up to the "a1" and "a2" columns had repeated in the "A.hbm.xml" file.
The "many-to-one" element only have a "property-ref" attribute. But the "a1" and "a2" fields are used at the "where" condition or other tables associate, and I can't modify the "A" table because other systems uses it.
I hope you can resolve the problem with any method.
I'm apologize for my English. So sorry.
Thanks
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-3323) Error in SchemaUpdate using HSQLDialect with non Integer or Long primary keys
by Jan Justesen (JIRA)
Error in SchemaUpdate using HSQLDialect with non Integer or Long primary keys
-----------------------------------------------------------------------------
Key: HHH-3323
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3323
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6 and Hibernate Annotations 3.3.1 on HSQL DB
Reporter: Jan Justesen
>From HSQL manual:
"Only one identity column is allowed in each table. Identity columns are autoincrement columns. They must be of INTEGER or BIGINT type"
When using HSQLDialect, the following code fails during schema creation:
@Entity
public class Test {
@Id @GeneratedValue(strategy = GenerationType.AUTO)
private Short id;
}
Log output:
ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table Test (id smallint generated by default as identity (start with 1), primary key (id))
ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Wrong data type: ID in statement [create table Test (id smallint generated by default as identity (start with 1)]
--
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, 11 months
[Hibernate-JIRA] Created: (HHH-3326) Temporary tables created in SQLServer use the collation for tempdb, not the application database
by David Good (JIRA)
Temporary tables created in SQLServer use the collation for tempdb, not the application database
------------------------------------------------------------------------------------------------
Key: HHH-3326
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3326
Project: Hibernate3
Issue Type: Patch
Affects Versions: 3.2.4.sp1
Environment: SQLServer (All versions)
Reporter: David Good
Attachments: Dialect.java, SQLServerDialect.java, Table.java
The use of temporary tables for updates in SQLServer will fail if tempdb uses a different collation to the application db. Specifically, comparisons between the primary table columns and the temporary table columns fail.
It is unclear to me under what circumstances a temporary table is created, so I'm afraid no test case is attached. I do however attach modified versions of the following classes:
org.hibernate.mapping.Table
org.hibernate.dialect.Dialect
org.hibernate.dialect.SQLServerDialect
These resolve the issue, but the solution may not be the most optimal possible, as it involves intervention in a specific position (between the datatype declaration and any nullability clause)
--
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, 11 months