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

  • Home
  • SEARCH
  • 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 8492157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:38:17+00:00 2026-06-10T22:38:17+00:00

I have an issue. I have SQL that I need to append different type

  • 0

I have an issue.

I have SQL that I need to append different type of “restrictions” or even do a join. This depends on user’s search criteria.

This SQL will involve different table as it can search one-to-many relationship, therefore hibernate ORM can’t support my requirement.

May I know if there is a design pattern to help construct such SQL statements?

  • 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-10T22:38:19+00:00Added an answer on June 10, 2026 at 10:38 pm

    The design pattern that fits to the problem of representing a language statement is the Interpreter pattern. But before you start to code your SQL parser, take a look to ANTLR.
    And what is more important, ask yourself two questions:

    1. Are the number of different SQL’s justify the effort of develop a general SQL interpreter solutions instead of programming (just if-else statements) my 5-10 different queries?
    2. Have I reviewed in detail the Hibernate reference manual?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're using SQL Server 2000 Query Analyser, and one issue we have is that
Strange issue. I have SQL Server running on an EC2 box that I can
I have an issue with a my SQL query. I need to execute a
I have this issue: first, I execute a SQL query using Java and then
I rarely use SQL and have a unique issue I need to solve. I
I am having trouble with the following SQL statement. I have had this issue
I have a SQL Server DB containing a registrations table that I need to
really struggling to resolve this issue. using nhibernate Im trying to join two different
I have some (untyped) XML being stored in SQL Server 2005 that I need
I have this issue that I can't seem to get my head around... Basically

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.