In the aqueduct ORM i created a table definition which has three columns: Id, username and password. The username and password column is of String type. I'm using a ProstgreSQL database and a table which i manually created (without the migration feature available in aqueduct ORM). The username and password columns in the table are of varchar type. Now the problem is, when i try to insert some values to the table using the ORM Query it produces an error: Specified parameter types do not match column parameter types in query INSERT INTO customers (username,password) VALUES (@v_username:text,@v_password:text).
I've gone through the aqueduct documentation and found out that it only support text type, https://aqueduct.io/docs/db/modeling_data/ Here you can see the datatypes associated with the PostgreSQL column types, Here String is associated with text (only?).
class customers
{
@Column(primaryKey: true, autoincrement: true)
int id;
@Column(unique: true, nullable: false)
String username;
@Column(nullable: false)
String password;
}
Is there any way i can use varchar instead of text?