Login Skip Navigation LinksWilsonORMapper > Forums Search
Demo Version Demo Version
Download and try for yourself a fully working demo version, including sample apps and documentation.  The only limitation is that the demo version only works inside the debugger.

PayPal Subscribe
Get It All for $50 USD:
WebPortal, ORMapper,
Source Code, All Updates
PayPal

User Login User Login
Log In
 
 
Reset Password

Wilson ORMapper Forums Wilson ORMapper Forums : Templates & More : possible bug in QueryHelper

Date Post
1/23/2006 7:11:21 AM the scenario:

S_SHARED_DOCUMENTS table with ID_USER_WHO and ID_USER_WHOM fields.

Query Helper returns (OPathQuery : SQL statement):

1. SSharedDocument.IdUserWhom==1 : [S_SHARED_DOCUMENT].[ID_USER_WHOM]=1 (this is correct).

2. SSharedDocument.IdUserWho==1 : [S_SHARED_DOCUMENT].[ID_USER_WHO]=1 (this is correct).

3. SSharedDocument.IdUserWhom==1 || SSharedDocument.IdUserWho==1 : [S_SHARED_DOCUMENT].[ID_USER_WHOM]=1 or [S_SHARED_DOCUMENT].[ID_USER_WHO]=1 (this is correct).

4. SSharedDocument.IdUserWho==1 || SSharedDocument.IdUserWhom==1 : [S_SHARED_DOCUMENT].[ID_USER_WHO]=1 or [S_SHARED_DOCUMENT].[ID_USER_WHO]m=1 (this is definitely incorrect and rather surprising!).

Wiktor Zychla
1/23/2006 9:37:36 AM Hi Wiktor:

I guess I need to flag that method in the QueryHelper as obsolete since it has not been maintained since a full OPath engine was added. Either use the an OPathQuery object instead of the QueryHelper, or use the simpler QueryHelper method that helps you build expressions but doesn't take an OPath expression itself.

Thanks, Paul Wilson
1/25/2006 12:37:56 AM Paul,

thank you for your suggestion. Unfortunately as you know the OPath engine does not directly support paging and thus I cannot use it my this scenario. I really keep my fingers crossed then that the support for OPath paging is one of your priorities for the next release.

I also suggest that you remove that method in the QueryHelper at all instead of making it obsolete to prevent other developers from falling onto such subtle bugs (obsolete does not exacly means that something is allowed to have bugs ;)

Keep up your good work.

Regards,
Wiktor Zychla
1/25/2006 4:56:36 AM Jeff is working on OPath paging, so hopefully the next version. In the meantime, the OPath method in QueryHelper is now marked obsolete. Should it have bugs? No, but sadly it was forgotten about and should have been obsoleted some time ago.

Thanks, Paul Wilson