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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:25:18+00:00 2026-06-07T14:25:18+00:00

My client wrote the back-end for an application i’m building using PHP. However He

  • 0

My client wrote the back-end for an application i’m building using PHP. However He didn’t write the database all too well. For instance there is two tables one ‘users’ and one ‘user_settings’. However his script would only create rows in ‘user_settings’ once a user decided to modify their settings. Otherwise his entire script used defaults, in his words “as an attempt to save database space”.

However, in Hibernate i’m having to try and get those ‘user_settings’ for some users and its causing problems for those that don’t have any set. Is there a way in hibernate that I would be able to insert some default settings into the database, after a call to getClientSettings() if nothing exists in the database for that client?

  • 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-06-07T14:25:19+00:00Added an answer on June 7, 2026 at 2:25 pm

    I dont know how exactly you have implemented the retrieval function , but one way i can suggest is you should try to retrieve the user_settings as an object, if the object is null then you can create a new instance of the mapped class (say user_settings) , set the key which is common (something like userId) , and then set other default values and then store the object in DB, this way your application would work without exceptions and defaults values will also get populated.

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

Sidebar

Related Questions

I wrote a server-client rmi application and I'm using MacOsX and Ubuntu laptops to
I wrote a makefile: all: server client server: server.o des.o sha1.o /usr/local/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -o server
I wrote some sort of console client for a simple application. To be more
I wrote a simple contact form for a client in Django. However, whenever it
I have a client that is running a custom VB 6 application they wrote
I would like to write a client application for Android that uses the Google
I'm working on a back-end functionality for a client. They want to be able
I have a tech demo application to write, with multiple clients: web client (ASP
I'm looking to write a single-page web application using RoR for the backend and
I wrote two small applications (a client and a server) to test UDP communication

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.