I am working on a restaurant app using Hibernate. I have several entities like Pizza, Beverage, Pasta etc.
I want these to be persisted to different tables but have primary keys that are unique among all. i.e if I say itemId 4 it should be sufficient to identify any of the food items available.
Any idea how to do it guys?
I would prefer a solution using Hibernate annotations. :-|