.NET Native issue

Issue #71 closed
Adrien Pellegrini created an issue

Hello,

I have a project that builds and runs perfectly until I enable the .NET Native compilation.

I got this following error :

An exception of type 'SQLiteNetExtensions.Exceptions.IncorrectRelationshipException' occurred in System.Private.CoreLib.dll but was not handled in user code

Additional information: XXX.YYYY: OneToMany relationship destination must have Foreign Key to the origin class

I use the 1.3.0 version of the nuget package.

(Did someone succeed in enabling .NET Native with SqliteNetExtensions ?)

Regards, Adrien.

Comments (5)

  1. Adrien Pellegrini reporter

    It seems that GetForeignKeyProperty/GetInverseProperty failed due to reflection issues. I was able to run 'simple' method like GetPrimaryKey, IsPublicInstance. Is it possible to configure or add some attributes to minimize reflection?

    In the worst case I'll stop using this library ...

  2. Adrien Pellegrini reporter

    I use this library because it's easy to use (to load data recursively), if I need to waste my time configuring xml type or whatever I'll just stop using it.

    You can close the issue. Sorry for the inconvenience ...

  3. Guillermo Gutiérrez

    One of the things that makes the library easy to use is that it doesn't require any configuration but annotating the properties that you already have in your projects. These annotations and these properties are found on runtime using reflection. You could move away from this implementing custom mappers as others have suggested, but (apart of the development of this capability) would require you to manually configure the relationship tree somewhere else. That will probably require more time and effort than adding a namespace to a XML file.

    Kind regards.

  4. Log in to comment