Just to be clear:
- I would like to enforce the not null constraints at commit time, but don't mind having null values during the flush, since those validation errors will likely be fixed in subsequent operations within the transaction, or else the entire transaction will fail.
Also: does anyone have any input on performance implications on auto-flush behavior for short transactions. Any locking/concurrency issues that we have to be aware of as a result of auto-flush?
------------------------
I have some objects with NOT NULL constraint on them.
When a query happens, the system tries to flush the dirty objects to the database before answering the query and raising an exception because of the not null constraints.
My understanding of the options are as follows: I can either set the FlushMode=COMMIT, which will result in stale data, and -I presume- will not incorporate any new objects i have created in memory, OR get rid of the NOT NULL constraints all together, and enforce them only in my Java API. Both options have obvious issues.
Can anyone recommend an alternate solution?
Thanks,
Kagan
|