Not sure if this is a Breeze or ODATA issue.
I'm having the following error upon execution of my ODATA query:
The child type 'job.volume' in a cast was not an entity type. Casts can only be performed on entity types.
The filter looks like this:
$filter:(JobGroup/JobJobGroup/any(x1: x1/job.volume eq 10d))
The where clause is built using the JSON notation:
{ "jobGroup.jobJobGroup": { "any": { "job.volume": { "eq": 10 } } } }
The model (only the relevant part):
public class WorkflowTask
{
public virtual JobGroup JobGroup { get; set; }
}
public class JobGroup
{
public virtual IList<JobJobGroup> JobJobGroup { get; set; }
}
public class JobJobGroup
{
public virtual Job Job { get; set; }
public virtual Guid JobId { get; set; }
public virtual JobGroup JobGroup { get; set; }
public virtual Guid JobGroupId { get; set; }
}
public abstract class Job
{
public virtual Decimal Volume { get; set; }
}
public class JobEditing : Job
{
}
Could it be related to the Job class being abstract ?
DbSet
for it, which makes sense, since it is abstract. How can you ask for data in a query that's being passed to the database from an object that doesn't exist in the database? – Jinny