3 Replies Latest reply on Feb 15, 2006 5:33 AM by Simon

    Criteria API for EJB3

    Andrew Apprentice

      How is it that this post does not have a reply?

      I am wondering the same thing now 1 year later. QBE and Criteria are the only ways I used queries in hibernate, I never liked the HQL as it is too close to SQL. If I wanted SQL I would not probably use straight JDBC and not hibernate/ejb3.

      If ejb3 isn't going to get Criteria and QBE like hibernate I feel like it is going to never get off the ground or suffer a quick death. Is there any talk on getting this into the EJB3 specification?

      I am converting my JSF project to use Seam. At first I was just using hibernate, but then thought I'd "better" go to EJB3 since Seam was written for it. I just started switching from Session to EntityManager and just found that I am forced to use this lame rip off of SQL. Is there any way to "convert" the EntityManager to a hibernate session, or should I just give up on EJB3 and admit that Sun still hasn't figured out how to make a usable EJB specification and just use Hibernate forevermore?

        • 1. Re: Criteria API for EJB3
          Emmanuel Bernard Master

          This is not planned in the group from EJB 3.0
          You can lobby for 3.1 though.
          Note that your opinion is not the mainstream opinion.

          You can always fallback to the underlying Session if needed.

          • 2. Re: Criteria API for EJB3
            Simon Newbie

            Thanks for the heads-up, Emmanuel.

            Criteria API is usually one of those things that turns out to be pretty important once I get deeper into a project. On my own Seam project, I'm more than happy to use HibernateEntityManager & hence Session, but some of my clients will be asking for EJB3 JPA only. Dynamic query building is not the nicest way to spend project time. Any helpful libraries for generating dynamic EQB-QL out there?

            Time to lobby the group, like you say...and I want proper darn List support too!

            • 3. Re: Criteria API for EJB3
              Simon Newbie

              Replied to this thread after finding via search, so didn't see the "don't post user questions" sticky in time. Sorry guys.