[jboss-user] [EJB 3.0] - Ejb 3 is DTO less??

laszlo.fogas do-not-reply at jboss.com
Tue Sep 5 06:10:57 EDT 2006


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?

lazlo

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969417#3969417

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969417



More information about the jboss-user mailing list