• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to prevent the saving of one property of an entity in the datbase

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am creating a application where I am integrated the spring and hibernate. So it's the User Registration Page basically. On this page I have password and confirm password property. I have created a entity class which is also act a model of spring. Now when I fetched the properties values and populate the Entity object and when I tring to save it it says "no confirm password column in user table".

Is their any way I can skip this property.

Thanks,
Gourav
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, I would not be using the same class as both the ORM Model and the View Model. You're likely to come up with many more occasions where the needs of the view are different than the needs of the persistence model.

But, if you ignore that advice, look for an annotation that will allow the column to be ignored.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess we can annotate with @Transient on the property getConfirmPassword.. to avoid looking for mapping column.
reply
    Bookmark Topic Watch Topic
  • New Topic