3 Replies Latest reply on Sep 5, 2006 8:26 AM by Laszlo Fogas

    Ejb 3 is DTO less??

    Laszlo Fogas Newbie

      Hi everyone!

      I doubt that this question is true. Here is my situation:

      I' ve 2 almost the same entities in 2 different table of the database. I generated two entity beans to access them.

      An other(object A in the future) entity references one of the former entities in a oneToMany relation.

      Sometimes i want access the 2 entities transparently through object A, what i mean is the client does not know which entity it works with, so i generated an Interface for the two entities with the needed methods.

      I have one SLSB for accessing object A, and there is a method which ideally return object A but with a Set(PreviouslyDefinedInterface) type for transparent working in the client side.

      That's why i changed in the entity the Set type to the interface.

      During deploy there is an error that the entity not mapped ...Interface. Which is true, because there's no such entity.

      I hope that this was clear :)

      So i can't see any option to avoid DTOs now.

      Could you give some designing tips?