Edge cases where you must use named parameters for FindBy FindAllBy

14 views
Skip to first unread message

Dan Maharry

unread,
Apr 30, 2012, 9:25:43 AM4/30/12
to simpl...@googlegroups.com
Mark,

In the original docs for FindBy and FindAllBy, it says 

"you may specify the column names as part of the method, or as named parameters. You can use whichever you prefer, unless you run into an edge-case which forces the named parameter form (more on that later)."

Do you have any specific examples where this is required or is this no longer true?

Dan

Mark Rendle

unread,
Apr 30, 2012, 9:58:09 AM4/30/12
to simpl...@googlegroups.com
It means when you have a column name with "and" in it. If you have a column called, for example, HandlingCode, and you try to do "FindByHandlingCode", the parser will split that into two columns: H & lingCode. So you have to use the named parameter form for columns with "and" in the name.
 
M

Dan Maharry

unread,
Apr 30, 2012, 4:19:16 PM4/30/12
to simpl...@googlegroups.com

Ah, I should have figured that one out myself.

 

Cheers Mark.

 

---

 

Dan Maharry

 

web: http://www.hmobius.com

blog: http://blog.hmobius.com

twitter: http://www.twitter.com/hmobius

Reply all
Reply to author
Forward
0 new messages