Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Update method

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

in my update method I'm concerned only about owner. That means I skip all fields in record beeing updated and I stop in front of owner field. Then I perform write. Is that right ? Could I ignore the other stuff completely ? This would be minimalistic but sufficient.

Thanks
Dalibor
 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Dalibor Kalna:
Hi all,

in my update method I'm concerned only about owner. That means I skip all fields in record beeing updated and I stop in front of owner field. Then I perform write. Is that right ? Could I ignore the other stuff completely ? This would be minimalistic but sufficient.

Thanks
Dalibor



It is up to you. If you ignore the other stuff, you would need to check it in your business logic by going lock-read-check-update-unlock.
 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you maybe talking cross-purposes.
I understood the question to mean

"Can I ignore implementing update on all fields except customer"

If this is the question I would say this is a mistake.

I would implement the database tier completely for all methods and make them totally agnostic of the business logic. Your update should be able to update all fields and only care that the max field lengths are adhered to.

I don't really see that your suggested approach is defendable at all. Unless I misunderstand you.
 
Or we might never have existed at all. Freaky. So we should cherish everything. Even this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic