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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:45:50+00:00 2026-05-15T00:45:50+00:00

I have a game consisting of a client / server + a webpage. A

  • 0

I have a game consisting of a client / server + a webpage. A central notion in both client and game-/webserver is an Account. Accounts are stored in a database thus I’m in need of some ORM and recently had a look at Hibernate and Cayenne.

My understanding however, is that both frameworks provide an "DatabaseBackedAccount"-class which I extend with my other Account methods. My problem is that the Account class is reused heavily on the client side, and I would obviously not want to include database-related code on the client implementation.

My current solution is to have an Account class (shared by server and client) and extend this with a DatabaseBackedAccount (overriding setter-methods and providing a commit method) on the server side. I find this quite natural and nice, however I’ve had to implement all gory sql-details and ORM myself.

Is there any way to “turn the table” in any existing ORM framework, so that the generated classes extend my existing class?

  • 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-15T00:45:50+00:00Added an answer on May 15, 2026 at 12:45 am

    In JPA (and in hibernate, but I know JPA better), there is no magic inside the entity classes, they are just POJOs with annotations (or configured via xml). So you may use them happily on the client side without any implications on the server side, as all the magic happens from the outside through the EntityManager interface.

    And on a more general note: an account should not be allowed to commit itself (just as it should not be allowed to create or delete itself) , there should be a service or DAO that does that from the outside, thus creating nice and clean POJOs that you can use on both client and server side.

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

Sidebar

Related Questions

I have a simple iPhone game consisting of two threads: the main game loop
I have a simple puzzle game. There is an image consisting of 16 tiles
I have a multi-user application consisting of a flex client and blazeds/Spring/java backend -
I have a table-top style game board consisting of 10x10 squares. Each square is
I have a game consisting of ships that fly around on a 2d grid.
i am writing a game in C++ and have a level consisting of many
I have a game server running on Google App Engine. Some of my HTTP
I'm developing a game. I want to have game entities each have their own
Update The reason I couldn't update properly was I didn't have game's jar file
I am trying to code a global lookup table of sorts. I have game

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.