polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislav Muhametsin <stanislav.muhamet...@zest.mail.kapsi.fi>
Subject Re: Postgresql indexing tests
Date Mon, 24 Oct 2016 15:20:12 GMT
In 
"extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLStartup.java"

file, there is "initTypes" method.
You might want to add mapping for Identity.class in this._primitiveTypes 
and jdbcTypes, and also most likely this._customizableTypes.

I say "might" want to, since I have really really vague memories on how 
that worked, and I realized I don't have any PC right now with Java 
coding environment set up.
The "appendColumnDefinitionsForProperty" method in the same file uses 
the type mappings mentioned above to deduce what kind of column is to be 
created for property, which might be the issue here.

Also, you probably want to modify the 
"/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/common/QNameInfo.java"

file, so that the detection whether some Java type is primitive is 
updated to include Identity.
It is done just before setting this._isFinalTypePrimitive.

Let us know if this is of any help to you. :)

On 24/10/2016 17:41, Niclas Hedhman wrote:
> Giving up for now...  I think the general problem is that Identity is a
> missing type for the Indexing system, and not so much about the toString()
> conversion that seems to have been missed only once.
>
>
> Cheers
> Niclas
>
> On Mon, Oct 24, 2016 at 9:26 PM, Niclas Hedhman <niclas@hedhman.org> wrote:
>
>> The issue in the indexing is that Identity is an unknown type for SQL.
>>
>> I added that in org.apache.zest.index.sql.support.skeletons.AbstractSQLStartup and
>> also added
>>
>> if( Identity.class.isAssignableFrom( primitiveClass ) )
>> {
>>      primitiveClass = Identity.class;
>> }
>> else
>>
>> in org.apache.zest.index.sql.support.postgresql.PostgreSQLTypeHelper.
>> SQLTypeHelperMixin#getSQLType(java.lang.reflect.Type)
>>
>> That fixed all the test org.apache.zest.index.sql.postgresql.
>> PostgreSQLQueryTest,script34
>>
>> Continuing....
>> --
>> Niclas Hedhman, Software Developer
>> http://zest.apache.org - New Energy for Java
>>
>
>


Mime
View raw message