Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32255
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2015-08-03 15:43 -0700 |
| References | <87380doatw.fsf@Equus.decebal.nl> <mp0l79$96j$1@speranza.aioe.org> <mp1lk3$4bj$1@speranza.aioe.org> |
| Message-ID | <f9c0d147-9d87-4af2-8832-72f0ff80fa67@googlegroups.com> (permalink) |
| Subject | Re: From JDBC to JPA |
| From | Lew <lewbloch@gmail.com> |
Cecil Westerhof wrote: > >> I need to change the use of JDBC to JPA in a range of applications. I > >> am new to JPA. Anyone good tips or links on how to accomplish this? > >> Until now I did not find anything very useful with Google. JPA is not a replacement for JDBC generally. You use JDBC when you think of a persistent store as a set of data tables. You use JPA when you think of persistent objects. The ontologies differ. JDBC you don't have 'EntityManager', you have transactions, you have artificial ID fields declared as "INTEGER", you have rows and columns. JPA you have objects in a managed state, that own relationships to other object types. (Not relations!) You don't want or use a DAO approach. You shouldn't ever link objects via an ID field, or even expose it in the model. Good luck. To the degree that you use JPA fro a data mindset instead of an object one, you will be screwed. -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
From JDBC to JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-24 17:05 +0200
Re: From JDBC to JPA Eternal Hope <laughingspam99@gmail.com> - 2015-07-24 17:53 +0100
Re: From JDBC to JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-24 22:03 +0200
Re: From JDBC to JPA Eternal Hope <laughingspam99@gmail.com> - 2015-07-25 05:23 +0100
Re: From JDBC to JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-25 10:37 +0200
Re: From JDBC to JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-25 23:45 -0400
Re: From JDBC to JPA Fredrik Jonson <fredrik@jonson.org> - 2015-07-25 08:12 +0000
Re: From JDBC to JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-25 23:49 -0400
Re: From JDBC to JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-25 23:38 -0400
Re: From JDBC to JPA Joerg Meier <joergmmeier@arcor.de> - 2015-07-24 20:40 +0200
Re: From JDBC to JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-24 15:45 -0400
Re: From JDBC to JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-24 22:32 +0200
Re: From JDBC to JPA Joerg Meier <joergmmeier@arcor.de> - 2015-07-24 22:32 +0200
Re: From JDBC to JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-24 23:18 +0200
Re: From JDBC to JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-25 14:40 -0400
Re: From JDBC to JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-25 23:53 -0400
Re: From JDBC to JPA Lew <lewbloch@gmail.com> - 2015-08-03 15:43 -0700
csiph-web