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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:52:05+00:00 2026-05-17T21:52:05+00:00

I have table Event and table Sessions and each event has a set of

  • 0

I have table “Event” and table “Sessions” and each event has a set of sessions and each session has start date and end date.

Event start date : is the start date of first session of that event
Event end Date : is the end date of the last session of that event.

what i want to do is return all the events that have start date with entered filters (start – end) using hibernate.

 Criteria eventCriteria = getSession().createCriteria(Event.class);
 eventSessionCriteria = eventCriteria.createCriteria("sessions");
 eventSessionCriteria.add(Expression.ge("startDateAndTime", start));`
 eventSessionCriteria.add(Expression.lt("startDateAndTime", end));

By the previous code : will return the events that have session has start date within entered interval (start – end) which is wrong

I want to do is return the events that have first session(The session that has min start date between all sessions of the event) started within the interval (start – end)

How can i get min session date By using hibernate ?

Thanks in Advance

  • 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-17T21:52:05+00:00Added an answer on May 17, 2026 at 9:52 pm

    Order by startDateAndTime and limit the max number of results to one ?

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

Sidebar

Related Questions

I have a Join Model I just Migrated called EventUsers that has an user_id,
I have HttpSessionListener to listen for when sessions are created and destroyed. I have
Im about to create a very simple online event reservation application and currently have
I cant understand why edit and new links doesn't work. I have controller named
We use custom event tracking in our web application with Google Analytics to report
I have three tables: users, events, and user_events, then I do the following in
I am using quickfix 1.13.3 recompiled with ODBC and I have a strange behavior
I've notice some strange behaviour on my Drupal site. I like to understand the
I am currently working on a private messaging system. Right now I'm coding the

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.