JBPAPP-1528 HHH-3679 - Sybase conversion of Java byte to tinyint fails with 8-bit values causing unit test failures
git-svn-id: https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_2@15736 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
c89d869ffc
commit
01a6c4a30b
|
@ -47,7 +47,9 @@ public class InterfaceProxyTest extends FunctionalTestCase {
|
|||
SecureDocument d2 = new SecureDocumentImpl();
|
||||
d2.setName("Secret");
|
||||
d2.setContent( Hibernate.createBlob( "wxyz wxyz".getBytes() ) );
|
||||
d2.setPermissionBits( (byte) 664 );
|
||||
// Sybase only allows 7-bits in a byte to be inserted into a tinyint
|
||||
// column (0 <= val < 128)
|
||||
d2.setPermissionBits( (byte) 127 );
|
||||
d2.setOwner("gavin");
|
||||
Long d2id = (Long) s.save(d2);
|
||||
t.commit();
|
||||
|
|
|
@ -47,7 +47,9 @@ public class MixedTest extends FunctionalTestCase {
|
|||
SecureDocument d2 = new SecureDocument();
|
||||
d2.setName( "Secret" );
|
||||
d2.setContent( Hibernate.createBlob( "wxyz wxyz".getBytes() ) );
|
||||
d2.setPermissionBits( (byte) 664 );
|
||||
// Sybase only allows 7-bits in a byte to be inserted into a tinyint
|
||||
// column (0 <= val < 128)
|
||||
d2.setPermissionBits( (byte) 127 );
|
||||
d2.setOwner( "gavin" );
|
||||
d2.setParent( f );
|
||||
Long d2id = (Long) s.save( d2 );
|
||||
|
@ -92,7 +94,9 @@ public class MixedTest extends FunctionalTestCase {
|
|||
assertNotNull( d2.getContent() );
|
||||
assertEquals( "max", d2.getOwner() );
|
||||
assertEquals( "/", d2.getParent().getName() );
|
||||
assertEquals( (byte) 664, d2.getPermissionBits() );
|
||||
// Sybase only allows 7-bits in a byte to be inserted into a tinyint
|
||||
// column (0 <= val < 128)
|
||||
assertEquals( (byte) 127, d2.getPermissionBits() );
|
||||
assertNotNull( d2.getCreated() );
|
||||
assertNotNull( d2.getModified() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue