Bugfix
Detail
#28112
Creating a transient version of an object with sequence attribute starts transaction
If you transiently instantiate a class that defines an attribute that is normally filled with the value from a database sequence - e.g. to use the same type for a pure GUI display - then the object creation starts a transaction that is subsequently rolled back with a warning in the log.
Transient object creation must therefore not occupy default values that are only filled late in the commit of the transaction, because there is no such commit for these objects.
Test
- Define class with sequence attribute.
- Create transient instance - e.g. in the script console
- Check that the attribute has not been filled and that no warning appears in the log.