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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:18:30+00:00 2026-05-28T13:18:30+00:00

There are more than two common fields (id ,created_by,modified_date) in DB in different tables.

  • 0

There are more than two common fields (id ,created_by,modified_date)in DB in different tables.

While using inner join that same column name field values are overwrite .This is working fine in query browser tools but not works in spring 3, hibernate 3 environment.

Query:

select i.modified_date ,l.modified_date 
from illness i inner join illness_history l on i.id=l.ill_hist_illness_id 

Spring Configuration:

<bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver" />
    <property name="url" value="jdbc:mysql://localhost:3306/project" />
    <property name="username" value="root" />
    <property name="password" value="password" />
</bean>

<bean id="mySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource" ref="myDataSource" />
    <property name="packagesToScan">
        <list>
            <value>com.project.**.*</value>
        </list>
    </property>
    <property name="hibernateProperties">
        <props>
            <prop key="hibernate.generate_statistics"> true</prop>
            <prop key="hibernate.show_sql">true</prop>
            <prop key="cache.use_query_cache">true</prop>
            <prop key="cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
            <prop key="show_sql">true</prop>
            <prop key="hibernate.current_session_context_class">thread</prop>
        </props>
    </property>
</bean>

<tx:annotation-driven transaction-manager="txManager" />

<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="mySessionFactory" />
</bean>
  • 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-28T13:18:31+00:00Added an answer on May 28, 2026 at 1:18 pm

    This may be due to an unresolved bug in hibernate . Check here . Your solution would be inclde an Alias and test .

    select i.modified_date m1 ,l.modified_date m2, from illness i inner join illness_history l on i.id=l.ill_hist_illness_id 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've realised that there is more levels than all, debug, info, warn, error and
EDIT: For the inner queries, there could be more than one match per inner
Is there a way to update more than one Database having same schema using
If there is more than one way, please list them. I only know of
Yes, There's More Than One Way To Do It but there must be a
There may be more than one way to ask this question, so here's a
in the code below at first if statements block (there will be more than
Is there are more efficient way than the following for selecting the third parent?
Are there any cases in which anything more than a linear speed increase comes
Is there any possible way to apply more than CSS to a control through

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.