Hibernate: Dynamic Insert

While doing code-review I came across hibernate’s dynamic-insert property and found it really useful. dynamic-insert is a boolean attribute of class element as defined in hibernate-mapping-3.0.dtd. This is an optional attribute of the class element and if not defined explicitly defaults to false.

As the name says, setting this property to true makes insert query generated by hibernate dynamic i.e. it will include only non-null values of DTO in the prepared statement.

Let’s explore this with the help of an example, for which I’m using PostgreSQL 9 and Hibernate 5.1.0.
Continue reading “Hibernate: Dynamic Insert”

Kerala Travelogue – Kovalam

Our annual vacation would be incomplete if it didn’t have a beach destination. Kovalam’s pristine beaches was our last stop in Kerala before we flew back home.

Day 1

We checked-out from the houseboat and headed straight for Kovalam. This was the first stretch where we didn’t halt on the way and it took a little over 4 hours to reach there. We had booked Garden View Room at Turtle on the Beach via MakeMyTrip and the only non-Oyo & non-budget booking. As soon as we entered the hotel we were welcomed with shell garland, drink and wet hand towels. After finishing the formalities, we headed to the room and were accompanied by a lady staff who explained all the hotel amenities and in room features. WOW! Especially since, we had never ever received such a warm welcome from any of our previous hotels and it felt really awesome. The room was very clean and spacious. And guess what, it had a bath tub, which we thought was only there in the costlier beach view rooms. The last leg of our Kerala trip had got off to a wonderful start. For us Turtle on the Beach has set a new benchmark in luxury hotel.

Previously they had private access to beach, but since the pathway no longer exists they provide free pickup and drop to beach, which we never used since Hawa Beach is just 200 meters from the hotel.

Turtle on the Beach - Garden View
Turtle on the Beach – Garden View
Turtle on the Beach - Garden View Room - 1
Turtle on the Beach – Garden View Room
Turtle on the Beach - Garden View Room - 2
Turtle on the Beach – Garden View Room
Turtle on the Beach - Garden View Room - Bathtub
Turtle on the Beach – Garden View Room – Bathtub

In the evening we headed to the beach and explored around. The main beach area consists of two interconnected beaches, Hawa beach and Lighthouse Beach, former getting its name from the topless tourists that used to throng there (doesn’t happen anymore) and the later from the lighthouse at the end of the beach. We headed to the lighthouse only to find out that it closes doors at 5PM. We headed back to the beach, enjoyed the beautiful sunset and retreated back.

Kovalam - View Point
Kovalam – View Point
Sunset @ Hawa Beach Kovalam
Sunset @ Hawa Beach Kovalam
Steep access path to Hawa Beach
Steep access path to Hawa Beach

Continue reading “Kerala Travelogue – Kovalam”

Kerala Travelogue – Alleppey

Prelude

The main attraction of Alleppey is houseboat and we started searching for houseboat from the day we decided we were going to Kerala. We couldn’t finalize any from the ones we found online and finally our uncle who had been to Kerala a few months ago gave us the contact details of guy on whose houseboat they had stayed. After some lengthy discussions and a bit of haggling we finalized on Deluxe Houseboat Plan which would cost us ₹7000. In the deluxe plan the AC would work only during the night time and include lunch, evening snacks, dinner and breakfast. The check-in timing would be 12PM and checkout at 9AM.

Now, Munnar to Alleppey is about 180km and takes almost 6 hours to reach there accounting for a couple of halts in between. We were planning to stay only for one night in Alleppey and that too on the houseboat. So to make it on time for the house boat check-in at 12PM we would have to leave latest by 6 AM and would leave us too tired to enjoy the houseboat. So we decided that we will stay one night in Alleppey then next day go to the houseboat.

Day 1

As planned we post checkout we headed to Munnar Tea Museum and left from there for Alleppy by 12 o’clock. We took one halt for lunch on the way and reached Alleppey by 4 o’clock.

Our booking for Alleppey too were done via Oyo rooms and the hotel was A.J Park. The hotel’s interior were good and the rooms were also good, clean but cramped. Despite being Oyo Premium the room didn’t even have mini refrigerator and toilet paper was missing.

A.J.Park
A.J.Park’s Lobby
A.J.Park
Our Room @ A.J.Park
A.J.Park
Our Room @ A.J.Park
A.J.Park
Our Room @ A.J.Park

In the evening we headed towards Alleppey beach which was 1.8 km from the hotel, so we went there walking. We spent the evening on the beach, saw the beautiful sunset and then came back to hotel restaurant for dinner.

Alleppey beach
Alleppey beach
Old pier
Old piers at Alleppey beach
Sunset at Alleppey beach
Sunset at Alleppey beach

Continue reading “Kerala Travelogue – Alleppey”