Results 1 to 2 of 2
  1. #1
    ajt111 is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default Hibernate Join Query - Should be easy

    I am pretty new at using hibernate and need some help.
    I want to perform the bellow query in hibernate but can't seem to get the syntax correct. I am using a Postgres database.

    This query works when I run directly on the database:
    Java Code:
    SELECT x, y 
    FROM submissions AS s
    JOIN submissions_new AS sn ON (s.id = sn.submission_id)
    JOIN submissions_edited_voyages AS ev ON (sn.editor_edited_voyage_id = ev.id)
    JOIN voyages AS v ON (ev.voyage_iid = v.iid) 
    WHERE s.id = 1793231;
    I have attached my hibernate config

    Thanks for the help!!!
    Attached Files Attached Files

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

Similar Threads

  1. Help query with hibernate
    By wonderbiker in forum JDBC
    Replies: 0
    Last Post: 04-14-2009, 12:12 PM
  2. Regarding Join
    By adeeb in forum JDBC
    Replies: 1
    Last Post: 06-24-2008, 08:57 PM
  3. How to use join() method
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-09-2008, 07:33 PM
  4. Hibernate sql query
    By taicode in forum JDBC
    Replies: 0
    Last Post: 03-25-2008, 05:17 PM
  5. Replies: 0
    Last Post: 03-12-2008, 03:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •