That is, previously the relationship back from the child to the parent was being updated when the child bean was new or dirty BUT NOT in the case when the child bean was loaded and unchanged.
This fix includes that case updating the ManyToOne side of the relationship on the child when the save is cascaded.
* feat: Add query.setHint() to support sql hint as inline comment in select queries
This is for ORM queries only.
An ORM query like:
new QCustomer()
.setHint("FirstRows")
.select(QCustomer.Alias.id, QCustomer.Alias.name)
.findList();
Produces SQL that includes the hint as an inline comment like:
select /*+ FirstRows */ t0.id, t0.name
from customer t0
* Fix test QOrderTest
* feat: Add includeLabelInSql configuration option to include query label as inline comment in generated sql select
The generated select queries can look like:
select /* MyInnerTest.insert_and_find */ t0.id, ...
Using either query.setLabel() or profile location (which all query beans get by default). This means that tooling looking at sql in the database can more easily relate that sql back to application code.
* More tests for labels with includeLabelInSql=true
* Remove trim when using profileLocation label
commit 20152e16891582f8ff466a93ec2cf01871824d6d
Author: Rob Bygrave <robin.bygrave@gmail.com>
Date: Tue Feb 27 20:59:51 2024 +1300
#3341 Update DatabaseConfig for fluid style + javadoc
commit 1c495a7384
Author: Roland Praml <roland.praml@foconis.de>
Date: Mon Feb 26 10:25:42 2024 +0100
Fix: Compile errors
commit 574876b758
Merge: df7b0487777634fc3e
Author: Roland Praml <roland.praml@foconis.de>
Date: Fri Feb 23 16:16:39 2024 +0100
Merge branch 'master-rob' into FOCONIS-string-length-validation
commit df7b04877d
Author: Rob Bygrave <robin.bygrave@gmail.com>
Date: Mon Jun 26 21:16:32 2023 +1200
#3121 BindMaxLength validation
At deploy time derive a BindMaxLength property to use
per BeanProperty
commit 4683877e0b
Merge: 9a4b9d4bed0020ab8c
Author: Rob Bygrave <robin.bygrave@gmail.com>
Date: Fri Jun 23 16:51:34 2023 +1200
Merge branch 'string-length-validation' of github.com:FOCONIS/ebean into FOCONIS-string-length-validation
commit d0020ab8ce
Author: Roland Praml <roland.praml@foconis.de>
Date: Tue Jun 20 14:47:20 2023 +0200
Length validation less invasive
commit 9b3b8ad46a
Author: Roland Praml <roland.praml@foconis.de>
Date: Tue Jun 20 13:03:04 2023 +0200
extended DataBind, so that it could return the last bound object
commit ca3c02bc1c
Author: Roland Praml <roland.praml@foconis.de>
Date: Mon Jun 19 09:52:52 2023 +0200
Failing test for SqlServer
- Reuse the existing OmBeanListParent and child
- Simplify the test setup code
- Rename test methods to maybe better reflect what I think is failing
Noting that markAsDirty doesn't specifically have anything to do with this bug but it's more on whether the parent bean is dirty or dirty (markAsDirty is just a way to make the parent bean dirty).
This change is that findFutureCount, findFutureList, findFutureIds do not trigger a flush on BatchedPstmtHolder.
This is to address the possible ConcurrentModificationException that could occur at BatchedPstmtHolder.closeStatements(BatchedPstmtHolder.java:153)
Using SqlUpdate or an ORM Update query clear the appropriate part of
the PersistenceContext. The effect is that ORM queries executed after
a bulk update will effectively load a fresh copy of the data from the
database and will not reuse an instance from the persistence context
if the bean in question had already been loaded.