anboralabs / spatia-room

Implementation of spatia lite database to android component Room
MIT License
44 stars 4 forks source link

Can't return list of object [Cursor Objects] #1

Closed giboow closed 4 years ago

giboow commented 4 years ago

Hi! I have just test your library for one of my project. It works fine, but not for my case...

I wan't to return a list of object, but the use of @SkipQueryVerification annontation generate an error when I compile my project.

Error:Not sure how to convert a Cursor to this method's return type

issue-label-bot[bot] commented 4 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

dalgarins commented 4 years ago

Could you share a little more information about the issue? please, could you share the Dao interface?.

dalgarins commented 4 years ago

To solve the issue with Cursors It's necessary to modify AndroidX Components Room, because they use a memory database to validate queries and @SkipQueryVerification is not compatible with Cursors.

The solution for AndroidX, should be create a JDBC Driver for spatialite and use it in room query validations of AndroidX. With that implementation we could delete annotation @SkipQueryVerification for spatialite queries.

dalgarins commented 4 years ago

In future versions I will fix it for now is not a priority.