Questions tagged [updatemodel]
217 questions
0
votes
2 answers
Update model one of the properties of List type is null upon submit
I have Model class "Customer". One of its properties is a collection of object lets say "Order". I want that during edit I can modify the list of orders associated with the selected Customer that I want to update but when I submit the modified…

Jobert Enamno
- 4,403
- 8
- 41
- 63
0
votes
1 answer
How can I get my table back after I remove it from my EDMX file in Linq-to-Entities?
I am having trouble with my Linq2Entities model - I might be missing something obvious here.
Here is what I did:
Added an EDMX model file
Added TableX to the model
Went back to SQL Management Studio and updated TableX, changing its primary key
Went…

joshcomley
- 28,099
- 24
- 107
- 147
0
votes
1 answer
entity framework update relationship from database
i have two table which have relation, tables like that:
First Table: ProductionDemand --- ID(PK),Name,RevisionID(FK, not null)
Second Table: Revision --- ID(PK), Name
I create model by using two tables and the other tables (about 20 tables)
But…

ygoksu
- 3
- 1
0
votes
3 answers
YII Call to a member function getErrors() on a non-objec
Following this tutorial; When I try to get the data to display in the form and update
For my error was:
$n = $this->loadModel($id);
I want to make two models with one form, this is my code for update:
Controller:
public function…

m3mm0
- 1
- 1
- 4
0
votes
2 answers
How can I get ASP.NET MVC's UpdateModel to ignore primary key colum?
I have a table with a GUID primary key into which I'm trying to insert a newly-created object using an ASP.NET MVC Controller's UpdateModel method (db is a LINQ-to-SQL data context):
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult…

Frank Schmitt
- 25,648
- 10
- 58
- 70
0
votes
2 answers
ASP.NET MVC Update part of the model
I have very complex model. The flow is like this:
- in controller I populate the model from the database
- in view I have several tabs. After I fill in the info on the first tab, the second tab enables (this works just fine) and on click on the…

Sandra S.
- 181
- 1
- 3
- 22
0
votes
2 answers
EF5 Entry not updating
Im trying to update an entry with EF5 with the following actionresult:
[HttpPost]
public ActionResult Edit(int id, IEnumerable files)
{
if (ModelState.IsValid)
{
Reference reference =…

Kasper Skov
- 1,954
- 10
- 32
- 53
0
votes
2 answers
ClassCastException when calling TreeSet.contains( Long.valueOf( someLongValue ) )
Im stumped. I declare my set thusly:
private Set applicationIds;
Then I populate it like this:
public void setApplicationIds( Set applicationIds ) {
this.applicationIds = new TreeSet( applicationIds );
…

Lucas
- 14,227
- 9
- 74
- 124
0
votes
1 answer
Update record using model form in django
HI I am updating an existing record, but everytime I do, its is saying
Truncated incorrect DOUBLE value: 'user1'
I am pasting my view and models here. Please help me
Model
class BasicDetails(models.Model):
username = models.OneToOneField(User)
…

vkrams
- 7,267
- 17
- 79
- 129
0
votes
2 answers
Validation with a Service layer, how to update an entity
I've implemented a service layer in my application like:
http://www.asp.net/learn/mvc/tutorial-38-cs.aspx
(I use Linq2SQL). Now I've trouble in implementing the Edit ActionResult. In the Create (Post) ActionResult I take the service method:
if…
stroke
0
votes
1 answer
Rails: Update only when checkbox is checked
I want to update a model - only lines where the checkox is clicked and insert a remark
View:
<%= form_tag update_fb_instruction_users_path, :method => :put do %>
<% @user_wishes.each do |u| %>
<%= u.user.name %>
<%= fields_for…

Werner
- 81
- 2
- 10
0
votes
3 answers
UpdateModel not updating my model
I must have something incorrectly setup as I can't get the UpdateModel function to correctly update my model based on information passed in via a FormCollection.
My View looks like:
@model NSLM.Models.Person
@{
ViewBag.Title = "MVC…

ca8msm
- 1,170
- 3
- 15
- 37
0
votes
3 answers
How to update Django modelform without inserting?
I am having a problem with my Django code inserting new rows instead of updating existing ones. Many people on here have asked for help with a similar problem, but generally they forget about setting instance as in form = SomeModelForm(request.POST…

pcaisse
- 754
- 2
- 11
- 19
0
votes
1 answer
UpdateModel Exception
I'm trying to assign some values from FormCollection in my controller using UpdateModel.
Controller looks like:
public ActionResult EditValues(int id, FormCollection collection)
{
NamedClass picture = PictureProvider.GetById(id);
try
{
…

versus
- 95
- 6
0
votes
2 answers
Entity Manager - Updating the reference Id of my model
I have a Tablo object, which has a reference to a Ressam object. In my Edit action for Tablo, I want to be able to change the Ressam reference too, i.e referencing another RessamId. Here's the controller code, let's say I only want to change the…

Halo
- 1,524
- 3
- 24
- 39