diff --git a/MVMCore/MVMCore/Models/Model/ModelRegistry.swift b/MVMCore/MVMCore/Models/Model/ModelRegistry.swift index 78d8657..f148119 100644 --- a/MVMCore/MVMCore/Models/Model/ModelRegistry.swift +++ b/MVMCore/MVMCore/Models/Model/ModelRegistry.swift @@ -165,8 +165,11 @@ public struct ModelRegistry { //-------------------------------------------------- public static func getHandler(_ model: ModelProtocol) throws -> ModelHandlerProtocol.Type { - // Get the modelType - let modelType = type(of: model) + return try getHandlerType(for: type(of: model)) + } + + //get handler for the specific Model + public static func getHandlerType(for modelType: ModelProtocol.Type) throws -> ModelHandlerProtocol.Type{ // Get the category for the ModelProtocol guard let category = categories[modelType.categoryName] else {