mirror of
https://github.com/google/nomulus.git
synced 2025-07-09 04:33:28 +02:00
Make PremiumList.labelsToPrices "insignificant" (#1167)
* Make PremiumList.labelsToPrices "insignificant" Add the ImmutableObject.Insignificant annotation to labelsToPrices and also mark it as Transient. In order to do lazy-loads on this field, we need to do so explicitly: doing otherwise breaks the immutability contract and prevents detaching the object upon load. Note that this is an expedient solution to this problem, but not the optimal one. Ideally, the disassociation between PremiumList and its PremiumEntry's would be more explicit. However, breaking labelsToPrices out would at minimum require reworking the Create/UpdatePremiumList commands, which currently rely on passing around a self-contained PremiumList object, both from the parser interfaces and to the database. If this approach is acceptable, we can apply it to ReservedList and ClaimsList as well (though it may be easier to break the association in those cases). * Fix premium list "delete" to support a test * Fix a few more tests * Changes for review (updated javadocs) * Minor fixes * Updated getLablesToPrices() comment * Format fixes, fixed PremiumEntry interfaces PremiumEntry can now be SQL only.
This commit is contained in:
parent
5dbb3b8ff4
commit
29e330a78d
5 changed files with 70 additions and 28 deletions
|
@ -862,11 +862,6 @@ create index spec11threatmatch_check_date_idx on "Spec11ThreatMatch" (check_date
|
|||
foreign key (domain_repo_id, domain_history_revision_id)
|
||||
references "DomainHistory";
|
||||
|
||||
alter table if exists "PremiumEntry"
|
||||
add constraint FKo0gw90lpo1tuee56l0nb6y6g5
|
||||
foreign key (revision_id)
|
||||
references "PremiumList";
|
||||
|
||||
alter table if exists "RegistryLock"
|
||||
add constraint FK2lhcwpxlnqijr96irylrh1707
|
||||
foreign key (relock_revision_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue