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 : General Support : ManyToOne whereClause?

Date Post
5/7/2007 7:16:56 PM

Is it possible to apply a where clause to a field in a ManyToOne relationship? For example, the examples on this site has something like ContactDetails which has a ManyToOne relationship with Contact. Is it possible to filter data from the contact table when returning ContactDetails data?

If not, is it possible to do it the other way around? For example, return Contacts and filter on the ContactDetails table?

Sorry for the question. I've been using ORMapper for a while, but I never really used the relationships before.

Thanks,

Tim

7/24/2007 2:13:10 PM

This is possible with Jeff's OPath engine.  Check the OPath Docs that came with your OrMapper.  

However, it does not support paging.  Is it possible to accomplish this same request using another query method?  (CompiledQuery, ObjectQuery)?  And paging?

7/24/2007 4:09:34 PM Thanks for your response. I was able to workaround this using a different method. I think I ended up creating and using a stored procedure to do what I needed.

I have to look into the OPath engine one day. I haven't used it yet.