UPDATE
I've found out that this class:
class TDemo implements GormEntity, MultiTenant<TDemo> {
Long id
String textfield
Integer numberfield
Money moneyfield
Quantity quantityfield
LocalDate datefield
LocalTime timefield
Boolean checkbox
String filename
static embedded = [
'moneyfield',
'quantityfield',
]
static constraints = {
textfield nullable: false
numberfield nullable: false
moneyfield nullable: false
}
}
Generates the following table:
[image: image.png]
It looks like constraints are not applied.
What am I missing?
Cheers,
Gianluca
Gianluca Sartori
--
https://dueuno.com
On Thu, 23 Jul 2026 at 14:03, Gianluca Sartori <[email protected]> wrote:
> I'm writing here before opening an issue since I may be missing something
> trivial testing Dueuno on Hibernate7.
>
> This code always returns
> `java.sql.SQLIntegrityConstraintViolationException` independently from
> `failOnError`:
>
> ```
> @Transactional
> TPerson create(Map args = [:]) {
> if (args.failOnError == null) args.failOnError = false
>
> TPerson obj = new TPerson(args)
> obj.save(flush: true, failOnError: false)
> return obj
> }
> ```
>
> What am I missing?
>
>
>
> Gianluca Sartori
> --
> https://dueuno.com
>