[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5429?page=c...
]
loeri(a)gmx.net commented on HHH-5429:
------------------------------------
Is there any workaraound for this issue.
Like changing the generator class.
Ich have currently the same problem with:
<id name="id" column="ID" type="java.lang.Long">
<meta attribute="scope-set">protected</meta>
<generator class="native" />
</id>
Or does it work with older Derby Version i.e 10.5:*?
[regression] unable to persist entity using derby 10.6.1.0 and
hibernate 3.5+
-----------------------------------------------------------------------------
Key: HHH-5429
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5429
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.3, 3.5.4, 3.6.0.Beta1
Environment: derby 10.6.1.0 and hibernate 3.5+
Reporter: Max Giesbert
when inserting any kind of entity
@Entity
public class TestObject
{
private Long id;
private String test;
public TestObject(){}
@Id @GeneratedValue(strategy=GenerationType.AUTO)
public Long getId()
{
return id;
}
[...]
i get the following error message
org.hibernate.exception.ConstraintViolationException: could not insert:
[com.mypackage.TestObject]
>>java.sql.SQLIntegrityConstraintViolationException: Column 'ID' cannot
accept a NULL value.
>>org.apache.derby.impl.jdbc.EmbedSQLException: Column 'ID' cannot accept
a NULL value.
>>ERROR 23502: Column 'ID' cannot accept a NULL value.
>> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>> at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeColumn(Unknown
Source)
>> at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(Unknown
Source)
>> at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown
Source)
>> at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown
Source)
>>...
the same code is working fine with versions 3.3.2GA and annotations 3.4.0GA and earlier.
i just switched back...
--
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