     }
     
     public convenience required init?(managedObjectContext context: NSManagedObjectContext, withJSON json: String?) {
-        var entityName = NSStringFromClass(self.dynamicType)
-        if let lastPeriodRange = entityName.rangeOfString(".", options: NSStringCompareOptions.BackwardsSearch, range: nil, locale: nil) {
-            entityName = entityName.substringFromIndex(lastPeriodRange.endIndex)
-        }
-        
-        guard let entityDescription = NSEntityDescription.entityForName(entityName, inManagedObjectContext: context) else {
+        guard let entityDescription = NSEntityDescription.entityForName(self.dynamicType.entityName, inManagedObjectContext: context) else {
             return nil
         }
         

import CoreData

public class SerializableManagedObject: NSManagedObject, ManagedSerializable {
    
    override init(entity: NSEntityDescription, insertIntoManagedObjectContext context: NSManagedObjectContext?) {
        super.init(entity: entity, insertIntoManagedObjectContext: context)
    }
    
    public convenience required init?(managedObjectContext context: NSManagedObjectContext) {
        var entityName = NSStringFromClass(self.dynamicType)
        if let lastPeriodRange = entityName.rangeOfString(".", options: NSStringCompareOptions.BackwardsSearch, range: nil, locale: nil) {
            entityName = entityName.substringFromIndex(lastPeriodRange.endIndex)
        }
        
        guard let entityDescription = NSEntityDescription.entityForName(entityName, inManagedObjectContext: context) else {
            return nil
        }
        

    }
    
    public convenience required init?(managedObjectContext context: NSManagedObjectContext, withDictionary dictionary: SerializableDictionary?) {
        guard let entityDescription = NSEntityDescription.entityForName(self.dynamicType.entityName, inManagedObjectContext: context) else {
            return nil
        }
        
