Added: 1 year ago
From: patrickwashingtondc
Views: 24,966
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (20)

Sign In or Sign Up now to post a comment!
  • it's very helpful for me

  • Nice tutorial

  • Very Good Patrick like it ) its so simple when you expain . Great Job!

  • Changing @ Inheritance(strategy = InheritanceType.SINGLE_TABLE) to InheritanceType.JOINT or InheritanceType.TABLE_PER_CLAS­S wont work with @GeneratedValue(strategy = GenerationType.IDENTITY.

    For @ Inheritance(strategy = InheritanceType.JOINT) changing to GenerationType.AUTO worked.

    For @ Inheritance(strategy = InheritanceType.TABLE_PER_CLAS­S) changing to

    GenerationType.TABLE worked.

    Thanks again for the great tutorial.

  • @sv2021 : Wow.. great... i have followed you and works great.. Thanks dude....

  • Hi Patrick, your vedios have realy helped me a lot in learning hibernate. Thankyou very much. Greate work. All our good

    wishes are with you. Thanks a lot.

  • Patrick, thanks a lot for these videos! They are most definitely very useful. However, i think that you should never recommend using JOIN statements when dealing with databases as it is by far the most expensive operation to perform in any database system. Speed is nowadays usually more important than space and thus, for general purpose, I think that the best strategy to recommend is the TABLE_PER_CLASS.

  • Hi, I have a problem when I put @ Inheritance

    (strategy = InheritanceType.TABLE_PER_CLAS­S)

    I get the following error:

    Exception in thread "main" org.hibernate.MappingException­: Can not use identity column key generation with mapping for hibernatechapter5Inheritancema­pping.Module

  • Hi Patrick,

    Thanks a lot for the videos . very kind of you.

    Nice baritone voice

    GOD bless you with PROFOUND HAPPINESS and SUCCESS in all you do.

    Please do the same for STRUTS and SPRING.

  • Hi Patrick! Thank you so much for the tutorials you have posted. They are priceless.

  • question !!!

    - how can you inherit a class prop that is not the next up.

    -i want to use the prop form a class that is 3 clases up , without ussing some prop for the imidiate upper clases ???

  • @MrOprea3 you can simply annotate the properties you don't want as transient. Check my previous videos.

  • can any one share spring videos like this

  • Hi Patrick -- thanks once again for providing excellent training materials. 

    The first two strategies worked for me. I then dropped all tables, but 3rd strategy still fails with org.hibernate.Mapping-Exceptio­n: Cannot use identity column key generation with union-subclass mapping for: com.hibernate.chapter1.Project­.

    Do you know why I'm getting this error? Using Hibernate 3.4 and MySql 5.1

  • @HaveABeautifulLife It doesn't matter what database you use. Physically deleting the tables should be enough to recreate them.

  • @patrickwashingtondc changing the generationtype strategy on ID worked for me too.. i had the mapping exception and this little modification worked wonder.. can you explain what is the difference between default strategy and Table

  • @chintureddyk its explained in the videos

  • Hi, I had the same error ("Cannot use identity column key generation with union-subclass mapping for: com.hibernate.inheritance.Task­"). Tables were recreated but there was a problem with inserting data.

    I've changed GeneratedValue strategy to @GeneratedValue(strategy=Gener­ationType.TABLE) and now it works fine.

  • @HaveABeautifulLife : Remove @ID attribute, and assign primary key manually in Client program. Initially i have got same error, and i have rectified it by removing @Id attribute. Praveen

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more