• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it good to add JPA just to do the insertion of Bridging table ?  RSS feed

 
tangara goh
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi experts,

I am now adding JPA using EclipseLink into my web app, after trying in vain to insert the data into the bridging table.

However, I am getting tons of errors cos now the Collection portion they will ask me to use DAO instead of the Object .... and I wonder if this is the direction to go...

And then I chance upon this url :

http://www.adam-bien.com/roller/abien/entry/you_should_dao_if

I do not know what is DRY.

Hope someone can give me some pointers. Tks.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tangara,
DRY stands for "don't repeat yourself". It is good to avoid duplicate code.

That article suggests a DAO which is just a Java object. It doesn't say you need to add JPA.

What were you using before Eclipse Link?
 
tangara goh
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Tangara,
DRY stands for "don't repeat yourself". It is good to avoid duplicate code.

That article suggests a DAO which is just a Java object. It doesn't say you need to add JPA.

What were you using before Eclipse Link?


Hi Jeanne,

I am using Java Servlet.

And now I am adding EclipseLink and using JPA annotations so that I can do the insertion for the linking table easier.

I am not adding Hibernate so kindly let me know if the above is good enough to accomplish my task ?

Tks.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!