Hello,

I'm using Spring Data 3.0.0.RC1 and neo4j 2.0.0

I try to cast a result column with an array property on the database 
(embeddedDatabase) to an array property on my pojo

@QueryResult
public class CommunicationQueryResult  {
  
  @ResultColumn("daysOfTheWeek")
    protected String[] daysOfTheWeek;
...


The problem is when 
the 
org.springframework.data.neo4j.support.conversion.ResultColumnValueExtractor 
create the QueryResultBuilder of my array value 
(method extractFromAccessibleObject), they try to cast the array to 
iterable, and I have a classCastException

this is the ResultColumnValueExtractor.extractFromAccessibleObject code:

        if (returnType.isCollectionLike()) {
             QueryResultBuilder qrb = new 
QueryResultBuilder((Iterable)columnValue, converter);
             return 
qrb.to(returnType.getActualType().getType()).as(returnType.getType());
        } else
           return converter.convert(columnValue, returnType.getType(), 
mappingPolicy);


returnType is  a ClassTypeInformation of a [Ljava.lang.String, culumnValue 
is ans array of Strings, and returnType.isCollectionLike() return true 
(method called from org.springframework.data.util.TypeDiscoverer class on 
Spring Data commons 1.7.0.RC1)


Is it a bug on Spring Data? 

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to