[hibernate-dev] question on matrix testing

Mahesh Gadgil maheshgadgil at hotmail.com
Wed May 14 12:22:15 EDT 2014


Didn't drop it on purpose. Sybase products, IQ and SQL Anywhere support the CURRENT_TIMESTAMP but ASE doesn't. I am not the person to answer the question of why. Would you recommend skipping this test for ASE or there is some workaround I am not aware of?
ThanksMahesh

Date: Wed, 14 May 2014 09:32:08 -0500
Subject: Re: [hibernate-dev] question on matrix testing
From: steve at hibernate.org
To: maheshgadgil at hotmail.com

Why do you keep dropping hibernate-dev from the recipients?
What I find odd is that Sybase does not support one of the few functions that the SQL spec explicitly names.


On Tue, May 13, 2014 at 2:00 PM, Mahesh Gadgil <maheshgadgil at hotmail.com> wrote:




On item 3.Current_timestamp is not supported on ASE. Here is what happens for that particular test.
16:32:56,424 ERROR SchemaExport:425 - HHH000389: Unsuccessful: create table T_ENT_GEN_DEF (id int not null, alwaysDate datetime default CURRENT_TIMESTAMP not null, createdDate datetime default CURRENT_TIMESTAMP not null, lastName varchar(255) null, name varchar(255) null, updated datetime null, vmCreatedCalendar datetime null, vmCreatedDate datetime null, vmCreatedSqlDate date null, vmCreatedSqlTime time null, vmCreatedSqlTimestamp datetime null, primary key (id)) lock datarows

16:32:56,424 ERROR SchemaExport:426 - The name 'CURRENT_TIMESTAMP' is illegal in this context. Only constants, constant expressions, or variables allowed here.  Column names are illegal.


There are CURRENT_BIGTIME and CURRENT_BIGDATETIME functions but they need to be used with '()'. So this would work.create table T_ENT_GEN_DEF (id int not null, alwaysDate datetime default CURRENT_BIGTIME() not null ........


ThanksMahesh
Date: Tue, 13 May 2014 12:33:04 -0500
Subject: Re: [hibernate-dev] question on matrix testing

From: steve at hibernate.org
To: maheshgadgil at hotmail.com
CC: hibernate-dev at lists.jboss.org


On Tue, May 13, 2014 at 10:39 AM, Mahesh Gadgil <maheshgadgil at hotmail.com> wrote:


I am running hibernate tests on SAP SYBASE ASE database currently. I am looking to get advice on what the best solution is to these problems.I know some tests that could not be run on ASE, have been skipped using SkipForDialect annotation in the past.The issues I am listing are for the remaining tests.



1. Some tests like below create a "User" table, which is not allowed by ASE. This can be fixed (thanks Brett Meyer) by adding @Table annotation and renaming the  table by adding and escaping double quotes as "\"User\"" and setting 'set quoted_identifier on' option on ASE. If this change makes into the source code, would this impact testing of other databases?



  org.hibernate.test.cache.CollectionCacheEvictionTest

Yes, we should make this change upstream 


2. Many tests like below create column names in smaller case but use names with uppercase in the sql that's generated. These tests fail on ASE because of its default setting of 'case sensitive'. This is easily fixed by setting ASE to ignore 'case' altogether. However I believe we need to be consistent with our naming conventions to avoid such problems. org.hibernate.test.annotations.entity.BasicHibernateAnnotationsTest  ----- CATEGORY column



TBH I think that having case-sensitive (non-delimited) identifiers is silly.  I don't plan on changing these in the tests.  I'd expect you to alter the db to not use case-sensitive identifiers.


 
3. Some tests like below use defaults for datetime columns as CURRENT_TIMESTAMP. This needs to be replaced with getdate() for ASE. Is there a way, this can be made db independent or dynamic?

  org.hibernate.test.generated.DefaultGeneratedValueTest

current_timestamp is one of the few functions explicitly called out for support in the SQL standard.   SAP SYBASE ASE does not support that?


 		 	   		  

 		 	   		  


More information about the hibernate-dev mailing list