1 Reply Latest reply on Aug 29, 2006 5:45 PM by Gavin King

    Entity Scope question

    Samuel Mendenhall Apprentice

      The seam docs are not completely clear on where an Entity lives when it exists in several scopes.

      The following example:

      @Entity
      @Name("dog")
      @Scope(EVENT)
      @Role(name="currentDog", scope=SESSION)
      @Table(name="dogs")
      public class Dog implements Serializable {
      ....
      



      So now, when exactly does my dog live in the EVENT scope and when does he live in the SESSION scope with the name currentDog.

      Based on what I have observed so far, I would guess that the currentDog object gets put in the SESSION scope the first time I outject it, is that correct?

      Also, if I outject the dog object
      @Out Dog dog.
      


      Does this mean that the Dog object gets outjected to both EVENT(dog) and SESSION(currentDog)?