we're using v1.6.2 of the DataMapper & are currently experiencing an issue where QueryForObject<T> *occasionally* returns null without executing the query at all (we've verified this via logging on the db), returning null instead. I would expect ISqlMapper to throw if it encountered an error; so I'd like to ask: Under what circumstances would QueryForObject<T> return null?
On Wed, Apr 25, 2012 at 2:52 AM, Ralph Möritz <ralmor...@gmail.com> wrote:
> Hi,
> we're using v1.6.2 of the DataMapper & are currently experiencing an issue
> where QueryForObject<T> *occasionally* returns null without executing the
> query at all (we've verified this via logging on the db), returning null
> instead. I would expect ISqlMapper to throw if it encountered an error; so
> I'd like to ask: Under what circumstances would QueryForObject<T> return
> null?
> On Wed, Apr 25, 2012 at 2:52 AM, Ralph Möritz <ralmor...@gmail.com> wrote:
>> Hi,
>> we're using v1.6.2 of the DataMapper & are currently experiencing an >> issue where QueryForObject<T> *occasionally* returns null without >> executing the query at all (we've verified this via logging on the db), >> returning null instead. I would expect ISqlMapper to throw if it >> encountered an error; so I'd like to ask: Under what circumstances would >> QueryForObject<T> return null?
On Wed, Apr 25, 2012 at 7:51 AM, Ralph Möritz <ralmor...@gmail.com> wrote:
> No, there's no cache model defined.
> On 25 April 2012 16:25, Michael McCurrey <mmccur...@gmail.com> wrote:
>> Are you using caching?
>> On Wed, Apr 25, 2012 at 2:52 AM, Ralph Möritz <ralmor...@gmail.com>wrote:
>>> Hi,
>>> we're using v1.6.2 of the DataMapper & are currently experiencing an
>>> issue where QueryForObject<T> *occasionally* returns null without
>>> executing the query at all (we've verified this via logging on the db),
>>> returning null instead. I would expect ISqlMapper to throw if it
>>> encountered an error; so I'd like to ask: Under what circumstances would
>>> QueryForObject<T> return null?
Unfortunately the problem is intermittent & I'll get fired if I shared any
code on a public forum. However, it seems the problem may in fact lie with
the DB rolling back transactions and not with the DataMapper.
On 25 April 2012 16:53, Michael McCurrey <mmccur...@gmail.com> wrote:
> are you using namespaces? Is it possible that you can attach a failing
> sample. I've never encountered that before
> On Wed, Apr 25, 2012 at 7:51 AM, Ralph Möritz <ralmor...@gmail.com> wrote:
>> No, there's no cache model defined.
>> On 25 April 2012 16:25, Michael McCurrey <mmccur...@gmail.com> wrote:
>>> Are you using caching?
>>> On Wed, Apr 25, 2012 at 2:52 AM, Ralph Möritz <ralmor...@gmail.com>wrote:
>>>> Hi,
>>>> we're using v1.6.2 of the DataMapper & are currently experiencing an
>>>> issue where QueryForObject<T> *occasionally* returns null without
>>>> executing the query at all (we've verified this via logging on the db),
>>>> returning null instead. I would expect ISqlMapper to throw if it
>>>> encountered an error; so I'd like to ask: Under what circumstances would
>>>> QueryForObject<T> return null?
This may seem unrelated but I've addressed strange issues like this
sometimes by making sure that I'm using the latest database driver to talk
to the database. Often times software ends up not updating their driver
DLLs and I've seen a good range of strange behavior under load.
If for any reason you can't recompile with an updated driver, you can
configure your .Net application to for it to use a different version in the
app/web.config.
On Wed, May 2, 2012 at 5:04 AM, Ralph Möritz <ralmor...@gmail.com> wrote:
> Unfortunately the problem is intermittent & I'll get fired if I shared any
> code on a public forum. However, it seems the problem may in fact lie with
> the DB rolling back transactions and not with the DataMapper.
> On 25 April 2012 16:53, Michael McCurrey <mmccur...@gmail.com> wrote:
>> are you using namespaces? Is it possible that you can attach a failing
>> sample. I've never encountered that before
>> On Wed, Apr 25, 2012 at 7:51 AM, Ralph Möritz <ralmor...@gmail.com>wrote:
>>> No, there's no cache model defined.
>>> On 25 April 2012 16:25, Michael McCurrey <mmccur...@gmail.com> wrote:
>>>> Are you using caching?
>>>> On Wed, Apr 25, 2012 at 2:52 AM, Ralph Möritz <ralmor...@gmail.com>wrote:
>>>>> Hi,
>>>>> we're using v1.6.2 of the DataMapper & are currently experiencing an
>>>>> issue where QueryForObject<T> *occasionally* returns null without
>>>>> executing the query at all (we've verified this via logging on the db),
>>>>> returning null instead. I would expect ISqlMapper to throw if it
>>>>> encountered an error; so I'd like to ask: Under what circumstances would
>>>>> QueryForObject<T> return null?