I have made an app and I experimented in two scenarios. Make a bean extend a Hibernate db object, or make the bean clear distinct from db object. In the first case, I had a quick way to access data. A quick way to make interfaces in the end of different beans extending the same db table. In the second case, I had to load the external inside the beans and go on.
Which way is the "by-the-book" way? Both seemed pretty nice, but I liked the first. Or shouldn't I ?