Skip to content

Conversation

@rjayasinghe
Copy link

No description provided.

@rjayasinghe rjayasinghe marked this pull request as draft December 1, 2025 11:01
@assert: (case
when BeginDate > EndDate
then 'End Date must be after Begin Date.'
when Bookings.Flight.date < BeginDate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjayasinghe: The check "flight date is within the travel time" we already had with @assert.constraint in a separate annotation on the Bookings entity. It´s nice to integrate it here. The only thing I´m wondering is: what happens if you add a new Booking, is this assert properly validated? Probably not a patch draft, but hopefully on the draft activate

Description;
}

annotate my.Bookings with {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something that we had in the past already and that I have tested as well:

annotate my.Booking : ConnectionID with @assert: (case when to_Flight.OccupiedSeats >= to_Flight.MaximumSeats then 'no free seats on selected flight' end);

@beckermarc
Copy link
Collaborator

Replaced by #28

@beckermarc beckermarc closed this Dec 15, 2025
@beckermarc beckermarc deleted the assert branch December 15, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants