Oracleデータベースの上で実行されているODataサービスがあります。私はこれを次のように問い合わせることができます:nullを含む値に対してodataサービスを照会するときに例外が発生するのはなぜですか?
http://localhost:4930/Oracle.svc/XXKE_L2E_ADDRESSES_V%28%29?
$filter=PARTY_ID eq 10925&$select=*
そしてすべて正常に動作します。以下の場合
も、すべてが(フィールドのどれもNULL値が含まれていません)正常に動作します:(ADDRESS2がnull含むフィールドである)
http://localhost:4930/Oracle.svc/XXKE_L2E_ADDRESSES_V%28%29?
$filter=PARTY_ID eq 10925&
$select=ADDRESS_ID,PARTY_ID,CITY,ADDRESS1,PARTY_NAME
しかし、次のように失敗した:
http://localhost:4930/Oracle.svc/XXKE_L2E_ADDRESSES_V%28%29?
$filter=PARTY_ID eq 10925&
$select=ADDRESS_ID,PARTY_ID,CITY,ADDRESS1,PARTY_NAME,ADDRESS2
私が得る応答は:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code></code>
<message xml:lang="pl-PL">An error occurred while processing this request.</message>
<innererror>
<message>Value cannot be null.
Parameter name: value</message>
<type>System.ArgumentNullException</type>
<stacktrace> at System.Data.Services.WebUtil.CheckArgumentNull[T](T value, String parameterName)
at System.Data.Services.Internal.ProjectedWrapper.set_PropertyNameList(String value)
at lambda_method(Closure , Shaper)
at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at System.Data.Services.Internal.ProjectedWrapper.EnumeratorWrapper.MoveNext()
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)
at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)
at System.Data.Services.DataService`1.HandleRequest()</stacktrace>
</innererror>
</error>
エラーが発生しますか?ヌルの問題は何ですか?私が$select=*
と指定すると問題なく取得できます。どのようにこの問題を克服する?
EDIT:https://forums.oracle.com/forums/thread.jspa?threadID=2362250:私は、ここで説明したように、私はまったく同じ問題に直面していますことを考え出し
。フィールドを削除したので、8つしかないので、すべてを選択できます。私は9つのフィールドがある場合、私は一度にそれらの6つだけを選択することができます。私は10のフィールドを持っている場合、私は一度にそれらの3つだけを選択することができます。
誰かが解決策を持っているなら、私はそれを感謝します。
"MSは彼らがWCF Data Services Client 5.1でこの問題を修正したと信じています.NuGetの5.1.0-rcバージョンに修正が必要です。 /packages/Microsoft.Data.Services.Client/5.0.2 " –