You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to create a quota db entry with a null subscription, if the subscription attribute is omitted from the JSON object sent via the POST /quotas (QuotasResource.create()) REST endpoint.
SInce quotas.subscriptionId in the quotas table is a foreign key to the subscriptions table, this field should not be null.
So,
update the Java annotations in Quota.java so that valid quota objects have a subscription id
add a 'NOT NULL' clause to the quotas table creation clause for subscriptionId
The text was updated successfully, but these errors were encountered:
Hi @gothub - I made the subscriptionId nullable because we use the quotas table to satisfy two use cases: 1) Provide a list of generic quotas associated with a given product, and then 2) associate a specific quota with a specific subscription. Since quotas are only created or modified by bookkeeper admin subjects, we can control scenario (2) above in the controller logic. So, unless I'm missing something, I think we need to back out your changes in commit c4e9581. Otherwise our SQL script that populates the standard quotas will fail.
It's possible to create a quota db entry with a null subscription, if the
subscription
attribute is omitted from the JSON object sent via thePOST /quotas
(QuotasResource.create()) REST endpoint.SInce
quotas.subscriptionId
in the quotas table is a foreign key to thesubscriptions
table, this field should not be null.So,
Quota.java
so that valid quota objects have a subscription idThe text was updated successfully, but these errors were encountered: