-@Entity(tableName = "pattern_accounts",
- indices = {@Index(name = "un_pattern_accounts", unique = true, value = "id"),
- @Index(name = "fk_pattern_accounts_pattern", value = "pattern_id"),
- @Index(name = "fk_pattern_accounts_currency", value = "currency")
- }, foreignKeys = {@ForeignKey(childColumns = "pattern_id", parentColumns = "id",
- entity = TemplateHeader.class),
+@Entity(tableName = "template_accounts",
+ indices = {@Index(name = "fk_template_accounts_template", value = "template_id"),
+ @Index(name = "fk_template_accounts_currency", value = "currency")
+ }, foreignKeys = {@ForeignKey(childColumns = "template_id", parentColumns = "id",
+ entity = TemplateHeader.class, onDelete = ForeignKey.CASCADE,
+ onUpdate = ForeignKey.RESTRICT),