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
In my opinion one must always check if the property exists when using reflection. Now we will always get null-recerence exception when using AsyncPoco with Devart dotConnect for Oracle.
I can submit PR if you want.
Code should be:
public override void PreExecute(IDbCommand cmd)
{
var bbnProperty = cmd.GetType().GetProperty("BindByName");
if (bbnPropery != null)
{
bbnProperty.SetValue(cmd, true, null);
}
//see http://docs.oracle.com/html/A96160_01/features.htm#1048395
//if command does not have "InitialLONGFetchSize" property this code
// will not throw NullReferenceException
var ilfsProperty = cmd.GetType().GetProperty("InitialLONGFetchSize");
if (ilfsProperty != null)
{
ilfsProperty.SetValue(cmd, -1);
}
}
The text was updated successfully, but these errors were encountered:
Introduced with PR #17.
In my opinion one must always check if the property exists when using reflection. Now we will always get null-recerence exception when using AsyncPoco with Devart dotConnect for Oracle.
I can submit PR if you want.
Code should be:
The text was updated successfully, but these errors were encountered: