Skip to content

Commit 48d18c5

Browse files
update sqltype equals function
1 parent d6b6012 commit 48d18c5

File tree

1 file changed

+4
-1
lines changed
  • ktorm-core/src/main/kotlin/org/ktorm/schema

1 file changed

+4
-1
lines changed

ktorm-core/src/main/kotlin/org/ktorm/schema/SqlType.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ public abstract class SqlType<T : Any>(public val typeCode: Int, public val type
101101
* Two SQL types are equal if they have the same type codes and names.
102102
*/
103103
override fun equals(other: Any?): Boolean {
104-
return other is SqlType<*> && this.typeCode == other.typeCode && this.typeName == other.typeName
104+
return other is SqlType<*>
105+
&& this::class == other::class
106+
&& this.typeCode == other.typeCode
107+
&& this.typeName == other.typeName
105108
}
106109

107110
/**

0 commit comments

Comments
 (0)