mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 16:19:35 +01:00
fix(production): JPA-Save-Pattern, Optimistic Locking und Domain-Validierung
- Managed-Entity-Update statt detach/merge (verhindert DELETE+INSERT-Churn) - @Version für Optimistic Locking mit ConcurrentModification-Error - Null-Checks für quantityUsed/quantityUnit vor BigDecimal-Parsing - Duplicate-Check nach Consumption.create() für robustere Validierung - FetchType.EAGER→LAZY für BatchEntity.consumptions - Liquibase-Migration 020 für version-Spalte
This commit is contained in:
parent
a9f5956812
commit
9eb9c93fb7
17 changed files with 133 additions and 37 deletions
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<databaseChangeLog
|
||||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
|
||||
|
||||
<changeSet id="020-add-version-to-batches" author="effigenix">
|
||||
<addColumn tableName="batches">
|
||||
<column name="version" type="bigint" defaultValueNumeric="0">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
@ -24,5 +24,6 @@
|
|||
<include file="db/changelog/changes/017-timestamps-to-timestamptz.xml"/>
|
||||
<include file="db/changelog/changes/018-add-article-id-to-recipes.xml"/>
|
||||
<include file="db/changelog/changes/019-create-batch-consumptions-table.xml"/>
|
||||
<include file="db/changelog/changes/020-add-version-to-batches.xml"/>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue