LBLGen Pro version - 4.2.
My tries:
var dtFields = new ResultsetFields(14);
dtFields.DefineField(...);
...
var filter = new PredicateExpression()
{
new FieldCompareValuePredicate(OrganizationFields.Active, ComparisonOperator.Equal, true)
}
var dtDefenition = new DerivedTableDefinition(dtFields, "o", filter);
var r = new RelationCollection();
r.Add(new DynamicRelation(dtDefenition));
// trying add other relation - not happen
r.SelectListAlias = "o";
var organizations = new OrganizationCollection();
organizations.GetMulti(null, r);
But this doesn't work
Generate:
SELECT
*
FROM
(
SELECT
*
FROM organization
WHERE organization.active = true
)
LIMIT 1000;
But i want use limit in FROM. Because a lot of JOINs.
UPD!!!
Sorry for my first post. Query in first post - are correct. But how it implement in LLBLGen?