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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:26:03+00:00 2026-05-14T05:26:03+00:00

I want to make an hibernate querycount on a table. I have to values,

  • 0

I want to make an hibernate querycount on a table.

I have to values, one string and one boolean

HibernateUtil.queryCount(VoteOnPublication.class, new String[] {VOTED_PUBLICATION_ID_FIELD, FOR_OR_AGAINST_FIELD}, **********************);

my voted_publication_id_field is a string, and my for or against field is a boolean.

What should i put in my second part of the query ?
I first put : new String[] {publication.getId(),true.toString()
but that didnt work.
i think the new String is the mistake but i dont know what to put

  • 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-14T05:26:04+00:00Added an answer on May 14, 2026 at 5:26 am

    This is a wild guess (because HibernateUtil is a custom class, it’s not part of Hibernate API) but I’d bet on the following signature for the queryCount method:

    public static int queryCount(Class<?> clazz,
                                 String[] properties,
                                 Object[] values) {
        ...
    }
    

    So try this:

    HibernateUtil.queryCount(VoteOnPublication.class, 
                             new String[] {VOTED_PUBLICATION_ID_FIELD, FOR_OR_AGAINST_FIELD},
                             new Object[] {publication.getId(), true});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I use hibernate eclipse plugin to generate java class from my table, the
I have Hibernate with 2nd level cache provided by Ehcache. I have Parent and
I want to make a Linux application that send a message to a remote
Does anyone know a way to intercept the call Hibernate will make to instantiate
I'm using Hibernate and I have a process/best practices issue. For an example, lets
Let's say we have a massive CSS file that is used to style the
Suppose I have a Java or C# application in which I have classes like
I am porting my Dao layer from KodoJDO to Hibernate. I am keeping my
We've got a Spring based web application that makes use of Hibernate to load/store
I use Eclipse as IDE. I use Eclipse to test my Java apps. But

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.