4 Replies Latest reply: May 12, 2009 7:34 AM by 843793 RSS

    JPA annotations

    843793
      Hi,
      I need to annotate JPA annotations with my own annotations. Any idea how to add annotations to JPA sources? Or how to override JPA annotations? Cos I heard there is a way by defining something like proxy for the annotations.. Thank You..
      Milan
        • 1. Re: JPA annotations
          843793
          Hi milan.nosai,

          Here's something that may interest you : [My first Custom Annotation|http://sujitpal.blogspot.com/2008/03/my-first-custom-annotation.html] !
          • 2. Re: JPA annotations
            843793
            Thank you very much for your post, but now I think I didnt explain my problem clearly. I know how to define my own annotation type, I already have defined anotation type of metaannotation and I need to use that metaannotation on annotations, that are defined in JPA. In other words I need to "edit" JPA annotations by annotating them with my own metaannotations. Sorry for confusing you, but my english is probably not so good as I thought it is:).
            • 3. Re: JPA annotations
              843793
              milan.nosal wrote:
              Thank you very much for your post, but now I think I didnt explain my problem clearly. I know how to define my own annotation type, I already have defined anotation type of metaannotation and I need to use that metaannotation on annotations, that are defined in JPA. In other words I need to "edit" JPA annotations by annotating them with my own metaannotations. Sorry for confusing you, but my english is probably not so good as I thought it is:).
              You cannot edit other existing annotation types through annotation processing.

              I suggest redesigning your system to only rely on annotations you apply to your own types.
              • 4. Re: JPA annotations
                843793
                thx for your opinions..