1 Reply Latest reply on Dec 4, 2008 12:04 PM by Adam Warski

    versionQuery casting problem

    dan dan Newbie

      Hi,
      When I try to issue the following:
      VersionsQuery versionQuery =
      reader.createQuery().forRevisionsOfEntity(Address.class, true);
      versionQuery =
      versionQuery.setProjection(RevisionProperty.min());
      versionQuery =
      versionQuery.add(VersionsRestrictions.idEq(new Long(2)));
      versionQuery = versionQuery.add(RevisionProperty.ge(1));

      Number revision = (Number)versionQuery.getSingleResult();


      I get the following:
      INFO [LongType] could not bind value '1' to parameter: 2; java.lang.Integer cannot be cast to java.lang.Long

      Do you know what's the problem?
      Thanks
      Dyahav