This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring 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

 
tangara goh
Ranch Hand
Posts: 240
  • 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: 37051
507
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: 240
  • 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.

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!