PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 19th, 2013, 11:59 PM
novotny75 novotny75 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 novotny75 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 58 sec
Reputation Power: 0
Query without schema prefix in front of table works fine on Mac OS X but not on Linux

Hi,

I'm using Java Hibernate ORM with Postgres and run into a problem having to do with schemas and table names.

The SQL generated by Hibernate looks like this:

Hibernate: select resourceit0_.CONFIG_ID as CONFIG1_0_1_, resourceit0_.RES_ID as RES2_18_1_, (select a12.URI from RESOURCE a12 where a12.ID=resourceit0_.RES_ID) as formula1_1_, resourceit1_.ID as ID5_0_, resourceit1_.description as descript2_5_0_, resourceit1_.INPUT_REF as INPUT3_5_0_, resourceit1_.name as name5_0_, resourceit1_.size as size5_0_, resourceit1_.SRC_URI as SRC6_5_0_, resourceit1_.status as status5_0_, resourceit1_.STATUS_MSG as STATUS8_5_0_, resourceit1_.type as type5_0_, resourceit1_.URI as URI5_0_ from smd.RESOURCE_SIM_CONFIG resourceit0_ inner join smd.RESOURCE resourceit1_ on resourceit0_.RES_ID=resourceit1_.ID where resourceit0_.CONFIG_ID=?

As you can see it doesn't prefix the inner select (select a12.URI from RESOURCE...) with the schema name.. it should be smd.RESOURCE as the others. Seems like a bug in Hibernate but at the same time, this query works fine on MAc OS X with java/hibernate 4.2.0 and postgres 8.4 but not on Linux using the same configuration.

Is there any config I can do on the server, so as to not touch the zillions of lines of Hibernate code to get this to work?

Thanks, Jason

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Query without schema prefix in front of table works fine on Mac OS X but not on Linux

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap