Deprecate Query bean constructor that takes transaction - migrate to usingTransaction()

Migrate to query.usingTransaction() instead of the constructor that takes a transaction.
This commit is contained in:
Rob Bygrave
2024-03-31 11:37:32 +13:00
parent 678b43693d
commit 16dca28831
2 changed files with 4 additions and 2 deletions
@@ -61,8 +61,9 @@ class KotlinLangAdapter implements LangAdapter {
}
writer.append(" /**").eol();
writer.append(" * Construct with a given Transaction.", name).eol();
writer.append(" * @deprecated migrate to query.usingTransaction()", name).eol();
writer.append(" */").eol();
writer.append(" @Deprecated").eol();
if (dbName == null) {
writer.append(" constructor(transaction: io.ebean.Transaction) : super(%s::class.java, transaction)", fullName).eol().eol();
} else {
@@ -160,7 +160,8 @@ class SimpleQueryBeanWriter {
writer.append(" }").eol();
writer.eol();
writer.append(" /** Construct with a given transaction */").eol();
writer.append(" /** @deprecated migrate to query.usingTransaction() */").eol();
writer.append(" @Deprecated(forRemoval = true)").eol();
writer.append(" public Q%s(io.ebean.Transaction transaction) {", shortName).eol();
if (dbName == null) {
writer.append(" super(%s.class, transaction);", beanFullName).eol();