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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:01:00+00:00 2026-06-14T04:01:00+00:00

A generic mapping should only contain type information without specific column detail,for example: <column

  • 0

A generic mapping should only contain type information without specific column detail,for example:<column name="code" type="string">.

A specific mapping contain column information, eg:<column name="code" type="string" sql-type="varchar" length="10">

Here is my confusion: Should this mapping being generic? if it’s generic, it’ll be easy to change database underground. But, I want to keep database detail in mapping files, which makes recreate database easier.

  • 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-14T04:01:02+00:00Added an answer on June 14, 2026 at 4:01 am

    If you recreate the DB from your java classes, then be specific.

    If you have a separate sql script to create the DB, the extra detail is just noise.

    Some non-requested advice (but I think your question hits this point in the face): from my experience, I think that creating the DB from the mappings is not good, as you can add more detail to your sql scripts (extra indexes, triggers, comments!, and other sorts of DB black magic). And going forward, how are you going to update that DB? Hiberante can update a schema but the process that does that is full of bugs. What are you going to do if you need to roll back?

    Just in case, what I mention above only applies if you’re doing a commercial application. If you’re doing something for fun / school / university, then you won’t need to care about updates and rollbacks.

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

Sidebar

Related Questions

The Generic Methods tutorial has this helpful example: public <T extends E> boolean addAll(Collection<T>
Using information from some of the questions here on generic views, I have created
I'm trying to create a mapping table between two generic (content_type) references, one for
I would like to define a completely generic mapping in c++ where I can
I am attempting to create a generic mapping function that takes the values of
Generic interface: interface IEntity<TKey, TValue> { TKey Key { get; set; } TValue Value
I'm developing a generic app on PHP that is dynamically customized for many clients.
Here's the generic class I'm working with: public interface IRepository<T> where T : EntityObject
Is there any generic alternative / implementation for MemoryCache? I know that a MemoryCache
I have the following generic class: public class MessageProcesser<T> where T : Message Inside

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.