[Hibernate-JIRA] Updated: (HHH-1083) Customization of CREATE TABLE with storage clause etc.
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1083?page=c... ]
Steve Ebersole updated HHH-1083:
--------------------------------
Fix Version/s: (was: 4.0.0.CR1)
metamodel
> Customization of CREATE TABLE with storage clause etc.
> ------------------------------------------------------
>
> Key: HHH-1083
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1083
> Project: Hibernate Core
> Issue Type: New Feature
> Components: core
> Reporter: Christian Bauer
> Assignee: Steve Ebersole
> Priority: Minor
> Fix For: metamodel
>
>
> Currently Hibernate features a hotfix for the MySQLInnoDBDialect:
> public String getTableTypeString() {
> return " type=InnoDB";
> }
> However, this is not the only appendix that is useful for CREATE TABLE. We should do several things:
> - allow appendix for CREATE INDEX, for example, to define the tablespace
> - pass in additional arguments to getTableTypeString(), such as tableName, schemaName, catalogName - for example, to allow custom Dialects to return different tablespaces for particular tables
> - probably rename the getTableTypeString() method to getTableAppendixString() and getIndexAppendixString()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[Hibernate-JIRA] Created: (HHH-6582) Schema validation fails on HSQLDB for @Type(type="text") fields
by Thilo-Alexander Ginkel (JIRA)
Schema validation fails on HSQLDB for @Type(type="text") fields
---------------------------------------------------------------
Key: HHH-6582
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6582
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.6
Environment: Hibernate 3.6.6, HSQLDB 2.2.4
Reporter: Thilo-Alexander Ginkel
When declaring an entity's field as
@Column(name = "description", nullable = true)
@Type(type="text")
the schema validation fails with the following error message on HSQLDB:
org.hibernate.HibernateException: Wrong column type in <table> for column description. Found: varchar, expected: longvarchar
at org.hibernate.mapping.Table.validateColumns(Table.java:283)
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1343)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:378)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:774)
[...]
Apparently, HSQLDB maps the longvarchar column generated by Hibernate into a varchar(16M), which confuses the validator.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[Hibernate-JIRA] Created: (HHH-6579) Failure to determine data type in field access mode
by Markus Mårtensson (JIRA)
Failure to determine data type in field access mode
---------------------------------------------------
Key: HHH-6579
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6579
Project: Hibernate Core
Issue Type: Bug
Components: annotations, metamodel
Affects Versions: 4.0.0.Beta5
Environment: Hibernate 4.0.0-Beta5 (org.hibernate.dialect.MySQLDialect)
Reporter: Markus Mårtensson
The below class, when passed through buildServiceRegistry() and buildMetadata()
will determine data type for "withGetter", but not for "withoutGetter".
The placement of @Id sets the class into field access mode and correctly picks up
both fields, but fields without a getter needs an explicit @Type annotation.
The expected behavior is for both fields to have their types determined.
@Entity
public class Bugged {
@Id Long withoutGetter;
Long withGetter;
public Long getWithGetter() { return withGetter; }
}
Datatype detection log excerpt follows:
11:20:14.423 [main] DEBUG o.h.m.relational.AbstractSimpleValue - setting datatype for column `Bugged`.`withoutGetter` : null
11:20:14.427 [main] DEBUG o.h.m.relational.AbstractSimpleValue - setting datatype for column `Bugged`.`withGetter` : null
11:20:14.433 [main] DEBUG o.h.m.relational.AbstractSimpleValue - setting datatype for column `Bugged`.`withGetter` : org.hibernate.metamodel.relational.Datatype@76303ac7[code=-5, name=long, javaClass=java.lang.Long]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month