2 Replies Latest reply on Apr 7, 2010 1:17 AM by amit Goyal

    facing problem while retrieving entity based on foreign-key which is a UserType

    amit Goyal Newbie

      We am facing problem while retrieving entity based on id which is a UserType

      We have an entity money which has a bag of levels


           <bag name="levels" inverse="true" cascade="all-delete-orphan"  outer-join="false">
                  <key column="MONEY_ID"/>


      Inside level.hbm.xml we have


      where UidType is a custom UserType



      The data gets persisted in the audit table. However on retrieving it is giving following error:-

      could not resolve property: moneyId_uid of: LevelImpl_AUD [select new list(e) from LevelImpl_AUD e where e.moneyId_uid = :moneyId_uid and originalId.REV.id = (select max(e2.originalId.REV.id) from LevelImpl_AUD e2 where e2.originalId.REV.id <= :revision and e.originalId.uid = e2.originalId.uid) and REVTYPE != :delrevisiontype]