• If I created an Entity in CoreData can I use it as a class with SwiftData?

  • Can I use SwiftData to cache the APIs response and make the app work offline in case the internet disconnect?

  • With the new SwiftData, if I understand correctly we access the model using an @Environment variable on the view. Doesn't this contradict the idea of MVVM which the idea is to have your view be as simple and be driven by the View Model. What is Apples recommended architecture or method to handle this?

  • Most of my apps are MVVM, will the SwiftData @Query work if it’s inside an @Observable viewModel instead of a View?

  • I would like to integrate SwiftData with my SwiftUI app. I would like to ask that will .modelContainer(for: [Class.self]) init brand new database instant every time? Or it can detect the database creation status automatically? What if I have multiple modelContainer mods with the same instance class? I am wondering this because I my mind, the database should be initialised by a dedicated code, and I want to know that why use the modifier methods to create database structure.

  • When using @Query to fetch from SwiftData in a SwiftUI view, are the sorting and predicates dynamic like they are with @FetchRequest for CoreData? I'm having a hard time setting them programmatically in a view.

  • In SwiftData, can I create a custom query using custom SQL or similar? Some of the use cases may include UNION or CTE queries.

  • With SwiftData is there a way to create a sectioned fetch request in the view?

  • I see from an earlier response that you can adjust a predicate for a @Query from the init() is this the recommended way to handle searching where as you type your updating a child view  init() with the updated value for the predicate.