The SQL error implies to me that the $parentPage wasn't instantiated properly. C5 is confusing in that the Page::getBy...()
and a few others will return an object even if the page doesn't exist -- it's your responsibility to check it for errors.
Are you expecting that /hotel
exists? You have to create it first. You should var_dump($parentPage)
after you've loaded it.