I have already searching on this forum for something about that but found nothing. Maybe It's just a too noooooob question, but I hope someone could help me on this.
I would like to know if some one can help me understand one thing about beans and database tables.
OK,
I have one table and also have a bean that is representation of this table.
I do a select on that table and iterate through the result set creating a new bean for each iteration adding it to an ArrayList. Everything is just fine with that. Things work just like I think they should do.
The problem: I have the same table, but now I need to do a sort of joins on it.
the question: Do I have to build a new bean representing all this joins?
ps: I am not using hibernate or any other jpa implementation.
What you are effectively doing is creating a 'view' for the data. I would recommend creating a Javabean that represents this view and use EJB QL to create and execute a query (whose results can be translated into the Javabean).