I have the following class that I am using as a dynamodb item in Kotlin
@DynamoDbBeandata class Transaction( @get:DynamoDbPartitionKey val userId: Int, @get:DynamoDbSortKey val timestamp: Long, val ticker: String, val transactionType: Type)val transactionTable = DynamoDBenhancedClient.table(MoneyBeacon.TRANSACTION_TABLE, TableSchema.fromBean(Transaction::class.java))I get this error:
java.lang.IllegalArgumentException: Class 'class db.aws.dynamodb.pojos.Transaction' appears to have no default constructor thus cannot be used with the BeanTableSchemaIf I set this class up with a default constructor then I will have change it to var and allow the values to be nullable which I don't want to do. Any other solutions?
Related questions
Related questions