Fixed
Details
Details
Assignee
Alex Zaytsev
Alex ZaytsevReporter
Aliaksandr Shukaila
Aliaksandr ShukailaLabels
Components
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created January 7, 2012 at 8:43 AM
Updated September 21, 2014 at 12:42 PM
Resolved May 13, 2013 at 1:45 PM
Solution in 3 steps:
1) Add new interface method to IManyToManyMapper interface:
public interface IManyToManyMapper : IColumnsMapper
{
...
void Where(string sqlWhereClause);
...
}
2) Implement new method in ManyToManyCustomizer class:
public void Where(string sqlWhereClause)
{
customizersHolder.AddCustomizer(propertyPath, (IManyToManyMapper x) => x.Where(sqlWhereClause));
}
3) Implement new method in ManyToManyMapper class:
public void Where(string sqlWhereClause)
{
manyToMany.where = sqlWhereClause;
}
Note) manyToMany field of ManyToManyMapper class contains a lot of interesting fields. I think these fields can be accessed in mapping by-code feature using the same approach. Need to extend IManyToManyMapper interface directly, or add additional parent interfaces to it.