         } else if let type = T.self as? DatabaseValueConvertible.Type {
             return type.decode(from: row, atUncheckedIndex: columnIndex) as! T
         } else {
-            return try T(from: RowSingleValueDecoder(row: row, columnIndex: columnIndex, codingPath: [column]))
+            return try T(from: RowSingleValueDecoder(row: row, columnIndex: columnIndex, codingPath: codingPath))
         }
     }
 }
 
 private struct RowDecoder: Decoder {
-    let row: Row
-    
-    init(row: Row, codingPath: [CodingKey]) {
-        self.row = row
-        self.codingPath = codingPath
-    }
-    
-    // Decoder
-    let codingPath: [CodingKey]
+    var row: Row
+    var codingPath: [CodingKey]
     var userInfo: [CodingUserInfoKey : Any] { return [:] }
     
     func container<Key>(keyedBy type: Key.Type) throws -> KeyedDecodingContainer<Key> {

}

private struct RowSingleValueDecodingContainer: SingleValueDecodingContainer {
    let row: Row
    var codingPath: [CodingKey]
    let column: CodingKey
    let columnIndex: Int
    
    /// Decodes a null value.
    ///
    /// - returns: Whether the encountered value was null.


private struct RowKeyedDecodingContainer<Key: CodingKey>: KeyedDecodingContainerProtocol {
    let decoder: RowDecoder
    var codingPath: [CodingKey] { return decoder.codingPath }

    init(decoder: RowDecoder) {
        self.decoder = decoder
    }
    
    /// All the keys the `Decoder` has for this container.
    ///
