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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:57:07+00:00 2026-06-13T10:57:07+00:00

I gota wired problem. I use the Hibernate to find entities by Example. Unfortunately

  • 0

I gota wired problem.

I use the Hibernate to find entities by Example.

Unfortunately I can not find any instance even if i got I have about 20000 entries in the Table.

My question is, how to debug this problem.

01  Puppy p = new Puppy()
02  List list = session.createCriteria(Puppy.class).add(Example.create(p)).list();
03  System.out.println(list.length());

Returns 0

EDIT: I even set all n-m and 1-n reations to null

  • 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-13T10:57:09+00:00Added an answer on June 13, 2026 at 10:57 am

    You are performing Query By Example, which means the properties in the Puppy instance p will generate the corresponding query, so that the result set matches with the example.

    I suspect there are some non-null properties in your Puppy instance.

    The easiest way to debug is to turn on SQL trace in Hibernate, so that you know what is the generated SQL, and hence, know what is the query criteria, and hence, know what field in the example instance is causing the problem.

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

Sidebar

Related Questions

Hi guys got a wired problem (well I find it a wired problem :P)
Got a problem with Apache and PHP-files of Wordpress. When I go to any
got a problem, can't get my head around this jquery and would appreciate your
I've got a strange problem with a static variable that is obviously not initialized
I've got a wired problem with the symfony 2 security component. Due to the
Okey so I got a really wierd problem that I can't understand. i got
got a bit of a problem with Zend not adding the base url into
I posted a question next() not working and gota reply which is working fine,
Got a seg fault from my memcpy that gdb can't give me anything else
Got a problem with my add function to my database. The following code hangs

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.