[Hibernate-JIRA] Updated: (HHH-1501) insert long string (more than 32700) fails on derby
by Strong Liu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1501?page=c... ]
Strong Liu updated HHH-1501:
----------------------------
Description:
http://issues.apache.org/jira/browse/DERBY-102
VARCHAR maximum length 32 672
LONG VARCHAR maximum length 32 700
CLOB maximum length 2 147 483 647
BLOB maximum length 2 147 483 647
this issue can be reproduced by org.hibernate.test.lob.TextTest (in 3.5 beta1,2) with change org.hibernate.test.lob.LongStringTest.LONG_STRING_SIZE > 32700
was:
Derby 10 varchar limit is 32672.
One need to change DB2Dialect and DerbyDialect to create clob columns, if size of text > 32k:
registerColumnType(Types.CHAR, 254, "char(1)");
registerColumnType(Types.VARCHAR, 32672, "varchar($l)");
registerColumnType(Types.VARCHAR, Integer.MAX_VALUE, "clob($l)");
(BTW, char limit is 254).
Affects Version/s: (was: 3.1.2)
3.5.0-Beta-2
Summary: insert long string (more than 32700) fails on derby (was: Derby 10 varchar limit is 32672)
> insert long string (more than 32700) fails on derby
> ---------------------------------------------------
>
> Key: HHH-1501
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1501
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.5.0-Beta-2
> Environment: Derby 10
> Reporter: Sergey Vladimirov
> Priority: Trivial
>
> http://issues.apache.org/jira/browse/DERBY-102
> VARCHAR maximum length 32 672
> LONG VARCHAR maximum length 32 700
> CLOB maximum length 2 147 483 647
> BLOB maximum length 2 147 483 647
> this issue can be reproduced by org.hibernate.test.lob.TextTest (in 3.5 beta1,2) with change org.hibernate.test.lob.LongStringTest.LONG_STRING_SIZE > 32700
--
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
14 years, 6 months
[Hibernate-JIRA] Created: (HV-266) NullPointerException when trying to validate an object with a class-level constraint annotation.
by Marcus Brito (JIRA)
NullPointerException when trying to validate an object with a class-level constraint annotation.
------------------------------------------------------------------------------------------------
Key: HV-266
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-266
Project: Hibernate Validator
Issue Type: Bug
Affects Versions: 4.0.1
Reporter: Marcus Brito
The JPATraversableResolver seems to fumble when passed a property path of "" (constraint on root bean class):
{code}
java.lang.NullPointerException
at java.lang.Class.searchFields(Class.java:2599)
at java.lang.Class.getField0(Class.java:2618)
at java.lang.Class.getField(Class.java:1518)
at org.hibernate.ejb.util.PersistenceUtilHelper.get(PersistenceUtilHelper.java:84)
at org.hibernate.ejb.util.PersistenceUtilHelper.isLoadedWithReference(PersistenceUtilHelper.java:76)
at org.hibernate.ejb.HibernatePersistence.isLoadedWithReference(HibernatePersistence.java:178)
at javax.persistence.Persistence$1.isLoaded(Persistence.java:81)
at org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:33)
at org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:112)
at org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:47)
at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:764)
at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:331)
at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:278)
at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:260)
at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:213)
at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
{code}
--
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
14 years, 6 months
[Hibernate-JIRA] Created: (HHH-3578) Add setReadOnly(true) method to the Criteria interface
by Graeme Rocher (JIRA)
Add setReadOnly(true) method to the Criteria interface
------------------------------------------------------
Key: HHH-3578
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3578
Project: Hibernate Core
Issue Type: New Feature
Components: core
Affects Versions: 3.3.1, 3.3.0.SP1, 3.3.0.GA, 3.3.0.CR2, 3.3.0.CR1, 3.2.6, 3.2.5, 3.2.4.sp1, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0.ga, 3.2.0.cr5, 3.2.0.cr4, 3.2.0.cr3, 3.2.0.cr2, 3.2.0 cr1, 3.1.3, 3.2.0.alpha2, 3.2.0.alpha1, 3.1.2, 3.1.1, 3.1, 3.1 rc3, 3.1 rc2, 3.1 rc 1, 3.1 beta 2, 3.1 beta 1, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0 final, 3.0 rc 1, 3.0 beta 4, 3.0 beta 3, 3.0 beta 2, 3.0 beta 1, 3.0 alpha
Reporter: Graeme Rocher
Currently the Query interface has a setReadOnly(true) method but the Criteria interface does not, this makes it impractical to use the Criteria API for read-only queries.
--
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
14 years, 6 months
[Hibernate-JIRA] Created: (HHH-3772) Constraint names cannot be quoted with backticks `
by Christian (JIRA)
Constraint names cannot be quoted with backticks `
--------------------------------------------------
Key: HHH-3772
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3772
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3, all database dialects
Reporter: Christian
Priority: Minor
Table and Column names can be quoted with ` but constraint names cannot be quoted. You can reproduces the bug with the following testcase:
@javax.persistence.Entity
@javax.persistence.Table( name = "`categories`" )
abstract public class Category {
...
@org.hibernate.annotations.ForeignKey( name = "`fk_categories_parent_id`" )
@javax.persistence.ManyToOne( targetEntity = Category.class )
@javax.persistence.JoinColumn( name = "`parent_id`" )
private Category parent;
...
}
The SchemaExport (hbm2ddl) creates the following SQL statement for Postgresql:
alter table "categories" drop constraint `fk_categories_parent_id`;
drop table "categories";
create table "categories" (
...
"parent_id" int8,
...
);
alter table "categories" add constraint `fk_categories_parent_id`
foreign key ("parent_id") references "categories";
I think this problem should be fixed in the method in the class org.hibernate.mapping.Constraint in the same way as in Table.java and Column.java:
old:
public void setName(String name) {
this.name = name;
}
new:
private boolean quoted = false;
public void setName(String name) {
if ( name.charAt( 0 ) == '`' ) {
quoted = true;
this.name = name.substring( 1, name.length() - 1 );
}
else {
this.name = name;
}
}
public String getQuotedName() .. same as in Column.java
public String getQuotedName(Dialect d) { .. same as in Column.java
public boolean isQuoted() .. same as in Column.java
public String sqlDropString( ... ) {
...
return "alter table " + getTable().getQualifiedName( dialect, defaultCatalog, defaultSchema ) + " drop constraint " + getQualifiedName();
...
}
public String sqlCreateString( ... ) {
...
String constraintString = sqlConstraintString( dialect, getQualifiedName(), defaultCatalog, defaultSchema );
...
}
--
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
14 years, 6 months
[Hibernate-JIRA] Created: (HHH-4070) createProxy() called even when hasProxy() returns false
by Philip Borlin (JIRA)
createProxy() called even when hasProxy() returns false
-------------------------------------------------------
Key: HHH-4070
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4070
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: 3.3.2GA, PostgresQL 8.3
Reporter: Philip Borlin
This problem occurs when an EntityTuplizer is used. In my case I throw an UnsupportedOperationException in my createProxy() method. I would expect that would be ok since my hasProxy() method returns false. This was working in 3.3.1 but broke in 3.3.2.
In DefaultLoadEventListener in the proxyOrLoad() method there is a call to persister.hasProxy(). This makes a call to AbstractEntityPersister which simply checks to see whether the entityMetamodel isLazy().
That check succeeds since lazy is sent to true.
The next check sees if isAllowProxyCreation() is false in the options.
Lastly creatProxyIfNecessary() is called which if the entity does not exist calls createProxy() on the persister. AnstractEntityPersister delegates this directly to the tuplizer.
At no point was the tuplizer's hasProxy() method ever consulted.
--
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
14 years, 6 months