Hi guys,
I have a query that looks like this
Code:
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 (in MySQL, a bigint(20). 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