Hi guys,
I have a query that looks like this
Document document = DocDAO.getSession().read(someId);
MyFile file = (MyFile) DAO.getSession()
.createQuery("SELECT file FROM MyFile file WHERE file.document = :document AND file.version = :version")
.setParameter("document", document)
.setParameter("version", version)
.uniqueResult();
Now, I should get a file where file.getDocument().getId() == someId, and someId is a BigInteger. But unfortunately, they are not equal. What kind of errors can lead to the queried entity not being the entity I was looking for?
Cheers
Nik