• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA Cascade options

 
swathis kumari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to understand the JPA cascade options available. Cascade.ALL, Casacde.REMOVE, ..Please tell me in simple what is the exact purpose of using it.
I am new and trying to learn these options, I am aware of the mapping relation ships, 1-1, 1- many, ....many-many.

Please explain me in simple the usage with a small example to persist the values in DataBase.. feel free to include as much information as this could help other new comers
with easy to learn the subject with out any hassles.
 
swathis kumari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one explain me with example what are the cascade options. taking simple examples, I am new to java, previously I was working in .NET technologies. urgent help me.

thanks.
Swathi Reddy.
swathisnuffy@gmail.com
isoft technologies.
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can get started with the samples shown in the above link. What you have done so far (perhaps with some code)? Or what problems you are having setting things up?
 
swathis kumari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumara,

thank you for the concern, I tried EXAMPLES on all the relationships 1-1. many-many, I could not understand what does the CASCADE.ALL, MERGE, DELETE..and others do. if you could
tell me how the above options ALL, MERGE, DELETE,..are used for to persist the relationsips into database?

can you tell with a very simple example instead sending a link.

reason I am here is as I could not follow what is explained in LInk.
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swathis,

Follow everything here http://schuchert.wikispaces.com/JPA+Tutorial+1+-+Getting+Started

That link help me a lot when starting with JPA.

Buy the Pro JPA2 book by Mike Keith.

Excellent combo.
 
swathis kumari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry, I am not sure if my question was straight forwrd or not....I dont want people giving me top 3 links from the google search. I just need a guy who can tell me the solution for my
question with simple example and explanation.

it does not make sense as learning the basics of JPA using beginners link for JPA at this point of time.

I need a information related to CASCADE option in JPA, its good if some one can tell what is casacde and which context can it be applied.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic