You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public T LoadByKey < T > (object key) where T : class
{
return Table < T > ().LoadByKey(key);
}
...
var result = KeyIndex as IKeyIndex < T, K >;
The cast attempts to use object as K when in fact the type of the index is expected. Example:
public class Record
{
public long Id {get;set;}
}
Database.LoadByKey(7), causes an exception to be thrown:
{System.ArgumentException: Primary Index Object mismatch (Int64 expected)
at Lex.Db.DbTable1.GetPrimaryIndex [ K ] () at Lex.Db.DbTable1.LoadByKey [ K ](K key)
at Lex.Db.DbInstance.LoadByKey [ T ](Object key)
...
The text was updated successfully, but these errors were encountered:
I am experiencing this behavior, with the example above, however using an int32 Id type. I'm currently using the 1.1.3.0 sources in a WP8 application from NuGet. Was this issue fixed at all?
Version 1.1.3.0:
public T LoadByKey < T > (object key) where T : class
{
return Table < T > ().LoadByKey(key);
}
...
var result = KeyIndex as IKeyIndex < T, K >;
The cast attempts to use object as K when in fact the type of the index is expected. Example:
public class Record
{
public long Id {get;set;}
}
Database.LoadByKey(7), causes an exception to be thrown:
{System.ArgumentException: Primary Index Object mismatch (Int64 expected)
at Lex.Db.DbTable
1.GetPrimaryIndex [ K ] () at Lex.Db.DbTable
1.LoadByKey [ K ](K key)at Lex.Db.DbInstance.LoadByKey [ T ](Object key)
...
The text was updated successfully, but these errors were encountered: