Uploaded image for project: 'Medici'
  1. Medici
  2. MMDB-241

AssociatableBeanUtil cannot reliably retrieve its annotations

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • 0.3
    • 0.2
    • Repository
    • None

      Adding an associatable bean to another bean simply adds a triple pointing to it. The getAssociationsFor call filters by RDF type. Hence the following snippet fails:

      CETBean cetBean; // any cet bean will do
      AnnotationBeanUtil abu = new AnnotationBeanUtil(beanSession);
      AnnotationBean annotationBean = new AnnotationBean();
      abu.register(annotationBean);

      abu.addAnnotationTo(cetBean, annotationBean);
      abu.getAnnotationsFor(cetBean); // returns nothing

      How to fix it? The best way is to not filter by RDF type or explicitly set the rdf type. I suggest the former.

              kooper Rob Kooper
              jgaynor Jeffrey Gaynor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: