Announcement Announcement Module
No announcement yet.
eclipseLink doesn't like transient entity manager Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • eclipseLink doesn't like transient entity manager

    I am using Roo M2....set up a project and installed a jpa like so:

    install jpa -provider ECLIPSELINK -dataBase MYSQL

    then, ran "mvn test" and it seems that EclipeLink doesnt like the transient on:

    transient javax.persistence.EntityManager Airport.entityManager;

    so, I changed them all (in xxx_Roo_Entity.aj) to public (Using a text editor)...and, EclipseLink seems to be happier. Not withstanding other errors, which I will investigate.

    Then, I restart Roo on the project and Roo, of course, changes them back to transient.
    Is there a way to force the use of a qualifier, other than "transient" on this annotation?


  • #2

    The transient field issue is known to cause problems with EclipseLink. I reported this back in February. You can vote on the ticket if you wish:



    • #3
      possible solution

      Thank you for the response.

      I have experimented and found that by putting the annotation and field definiton in the domain class allows an override. Placing :

      public javax.persistence.EntityManager entityManager;

      in the domain class causes Roo to use this definition.

      Is this the preferred way of doing this?



      • #4
        Well, omitting the transient keyword for the EntityManager would cause this field to be serialized - something that is definitely undesirable .

        However, as luck would have it, the EclipseLink bug seems to have been addressed over night . If you find the time, it would be nice if you could test it and see if it works now with the fixed version. Maybe EclipseLink releases nightly snapshots?



        • #5
          thanks again....I'll have a look at it at some's funny that it calls it "mapping" metadata