     func update<T:SSMappable>(model:T) -> SSResult<T> {
         let connector = SSConnector(type:.Scan)
         model.dbMap(connector)
-        var pkNovalueFg = false
-        for item in connector.scans{
-            item.attrs.forEach{
-                if $0.id == CLAttr.PrimaryKey.id {
-                    pkNovalueFg = (item.value == nil)
-                }
-            }
+        guard let _ = getPrimaryKey(connector) else{
+            return SSResult<T>(result: false)
         }
         
-        if pkNovalueFg {
-            return SSResult<T>(result: false)
-        }
         return executeInTransaction{
             [unowned self] in
             return SSResult<T>(result:self.conn.update(self.makeUpdateStatement(connector,model: model), values:self.getValues(connector)))

            let separator = count-1 == $0.index ? String.empty : ","+String.whiteSpace
            columns += "\($0.element.name)=?" + separator
        }
        let key = connector.scans.first{
            for item in $0.attrs {
                if item.id == CLAttr.PrimaryKey.id {
                    return true
                }
            }
            return false
        }!
        return "UPDATE \(model.table) SET \(columns) WHERE \(key.name)=\(key.value!);"
    }
    
    private func makeCreateStatement<T:SSMappable>(connector:SSConnector,model:T) -> String {

        conn.rollback()
    }
    
    private func getPrimaryKey(connector:SSConnector) -> SSScan? {
        for item in connector.scans{
            for element in item.attrs {
                if element.id == CLAttr.PrimaryKey.id {
                    if item.value != nil {
                        return item
                    }
                }
            }
        }
        return nil
    }
    
    private func makeUpdateStatement<T:SSMappable>(connector:SSConnector, model:T) -> String {
        var columns = String.empty
        let count = connector.scans.count{ $0.value != nil }
