15,907,328 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 15471521 (Top 8 by date)
Member 15471521
7-Mar-22 9:27am
View
I came to the same conclusion, but what confuses me is that this happens the second time I hit update. So I hit update once and I get the error messages, then I hit again update, expecting to get the same error messages and I get this error. So if it finds the id the first time why is it not finding it the second time? When I debug it gets to the GET mapping, then PATCH then again GET and shows errors. Then update -> error.
Member 15471521
22-Feb-22 4:30am
View
I have updated the code - I have entity with field countBookings + getters and setters. Then in service I have a static variable which I increment and set to entity. Then below is what I have tried in service - entity.setCountBookings(bookingEntity.getCountBookings() + 1);
Member 15471521
22-Feb-22 4:28am
View
I have updated the code - I have the entity with the field countBookings + getters and setters.
Member 15471521
20-Jan-22 13:29pm
View
Sorry, I found where the mistake is, I was checking the dates 28-29 with wrong roomId and expecting something else. Now I get data when there is a match and no data when there is no match which is what I expect. It works for now :) Thank you so much.
Member 15471521
20-Jan-22 13:09pm
View
Yes, that is correct, empty set result for the propertyId=2 with room id=3 (not in the DB). However shouldn't this query return something if there is a match? For example I tried b.check_in > '2022-01-28' and b.check_out < '2022-01-29', b.property_id = 1, br.room_id = 1 but it returns nothing. My idea was to check if a room is/is not booked (that is - is/is not in the booked_rooms table).Probably I am not going about it the right way.
Member 15471521
20-Jan-22 12:31pm
View
My idea was to check if a room is/is not booked (that is - is/is not in the booked_rooms table which is joined with the bookings table which has the dates.Probably I am not going about it the right way.
Member 15471521
20-Jan-22 12:08pm
View
I tried it and it does not return the room that is not in the DB (roomId=3, propertyId=2) however when I checked to see if it will return an existing booking with an existing room (roomId=1, propertyId=1, 28th till 29th ) it returns nothing.
Member 15471521
18-Dec-21 9:35am
View
you are right, I found my mistake! Thank you.
Show More