Help with Spring/Hibernate many to many CRUD interface?


can you help me with how I need to design the interface for CRUD ops using the Spring/Hibernate objects below?
I am new to hibernate and I am not seeing how I need to design the interface for CRUD ops.

Do I collect values for both author and citation in one form?
Or Do I collect the citation value first then create another form to collect the author value then attach this author record below the citation  like parent/child view?

Is there an example that uses to spring/hibernate to do insert  manyToMany relation tables?

Citation(citationid, articletitle,articletype)

public class Author {

public List<Citation> getCitations() {return citations;}

public class Citation {
public List<Author> getAuthors() {return authors;}

Open in new window

I forgot about the association table:
author_citation (authorid,citationid)

Open in new window

Who is Participating?
Spring Hibernate Tutorial

First off, it seems you are getting confused between your presentation layer and your model layer.

You are working on your underlying persisteance layer which is part of your object model.  Therefore how you load your information is irrelevant in terms of the design of your persistence model.

Notwithstanding that, there is no reason you couldn't take either approach at your presentation layer depending on the business use case for extracting these values.
dkim18Author Commented:
yes, I need help with presentation. Any suggestions?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.