0 Replies Latest reply on Jul 9, 2009 7:46 AM by livnats

    join without reference

    livnats

      Hi,
      Is there a way to map a class without having a reference to the class, instead telling hibernate to just use a referenceId?
      An example for the question:
      public class A{
      long id;
      long referenceId;
      }

      public class B{
      long id;
      String name;
      }

      let's say the referenceId in A has a B's id as value.
      Can i query for all A's that have referenceId to B who's name is "name".

      I know it is not a good practice, but is there a way to do that?