eight Posted March 26, 2016 Report Share Posted March 26, 2016 Any way to create the equivalent of Task.getTasks in the new API? I could recursively get children of children, but that seems pretty slow. Link to comment Share on other sites More sharing options...
eight Posted March 26, 2016 Author Report Share Posted March 26, 2016 Forgot to mention using includeChildren=True. Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted March 29, 2016 Report Share Posted March 29, 2016 Hey eight, If you have a project you can do: session.query('Task where project_id is "<project-id>"').all() If you have another non-project object id you will have to resort to a more hacky solution: session.query('Task where parent.id is "<object-id>" or parent.parent.id is "<object-id>"').all() I.e. using the parent relation to the depth that you know you have in your project. Link to comment Share on other sites More sharing options...
eight Posted March 30, 2016 Author Report Share Posted March 30, 2016 Thank you for the reply. It helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.