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 681523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:29:34+00:00 2026-05-14T01:29:34+00:00

The question is this. I have a number of persisted objects that I’ll pull

  • 0

The question is this.
I have a number of persisted objects that I’ll pull using Hibernate.

But during the application lifetime I’ll create a few objects that
do not live outside the running time of an app.

They are temporary, for example contain user’s choices, and they also hold
links to the persistent objects(tables). But as soon as application exited,
there’s no need in them so temporary objects are destroyed.

How do you think, should those objects be persisted in the same database where normal data is kept?

For example, they may be kept in temporary tables and on exit the data will be erased.

Or they may be created only in memory. Which is better?

  • 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-14T01:29:35+00:00Added an answer on May 14, 2026 at 1:29 am

    You generally don’t persist transient objects, unless there are a lot of them gobbling up memory and/or the objects are accessed only rarely, at which point the memory freed by not having them in memory can be used better.

    In my opinion, the basis of every design should be simplicity. As simple as possible while as complex as required. Adding Hibernate to those objects adds complexity and potential for trouble, and if it’s not necessary then don’t do it.

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

Sidebar

Related Questions

i know that have alot of question like this one, but i dont know
I hope this is allowed but I have a number of questions regarding Facebook
My question is this: I have an application designed for iPhone and I decided
I think I have read every article and stack overflow question regarding this, but
I have this question in my text book: Suppose that we have a set
I am afraid that this question might be a little too broad, but I
I guess this more of a design question, but I currently have a REST
Variations on this question have been asked, but not this specifically. I have a
I have a number of Eclipse projects that are all using classes from a
I spoke about this in a previous question, but I have since narrowed down

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.