Merge pull request #3376 from ebean-orm/feature/querybean-txn

Deprecate Query bean constructor that takes transaction - migrate to query.usingTransaction() instead
This commit is contained in:
Rob Bygrave
2024-03-31 11:38:26 +13:00
committed by GitHub
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();