Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ranch Hand
Posts: 354
  • 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.
 
author & internet detective
Marshal
Posts: 38249
623
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: 354
  • 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.

 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!