minor
nested entity specs
fix #12
fix byId query for invalid ids