[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: JPA and JSP

I have no direct experience with JSP and JPA, but I'll just yell some generics. Maybe it will trigger an idea.

First, a hidden field practically can only contain a prirary key value; your B-id. And when you set the property, you need to execute the find to convert the id to an entity. As you show in the second post, this could be included in the entity itself, but that is not what you want. So then the find must be done in the JSP page.

However no JSP binding logic will do that find for you, so you need to do this manually and that means you cannot use any automatic binding. From that perspective a special setter which does a find may not be a bad idea; the find code has to go somewhere and putting it in the entity at least makes it reusable.

Tom