Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3959198
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:42:01+00:00 2026-05-20T02:42:01+00:00

I have made an app and I experimented in two scenarios. Make a bean

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:42:02+00:00Added an answer on May 20, 2026 at 2:42 am

    This is a much more general question of “composition vs inheritance”, and is independent of Spring and Hibernate.

    See this other answer for a full description/argument.

    Briefly, while it’s sometimes tempting to extend another class for convenience, you almost always end up regretting it later. Go the extra mile, compose your objects rather than extend them, and you’ll win over the longer term.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an app that gets an array of addresses from a web
i have made an app that would calculate numbers from input fields. **main Activity
I have made an app that paints FFT to the screen realtime (from mic).
I have made an app where I read words from an rtf file File
I have made app which allows me to send message to multiple user from
I have made an app and i want to make it multi touch compatible.
I have made an app which uses DropBox SDK for iPhone to connect to
I have made an app that implements the iPhone's camera. When the user finishes
I have made an iPhone App which has a loginwithFacebook button , the login
I have made an android app which working fine. I implemented the Login functionality

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.