Most voted "model" questions
54 questions
Sort by count of
-
5
votes1
answer516
viewsWhat is the difference between an Entity and a Model (MVC and the like)?
In object orientation both are classes usually used to represent something that will be persisted (not that it is mandatory to persist), but what is the difference between them? Or are they…
-
4
votes1
answer661
viewsJava spring: Infinite recursion (Stackoverflowerror) error
I’m having trouble carrying out the method list of translations of the document, I’m not understanding the reason for the error, follows code: Translation.java @Getter @Setter @NoArgsConstructor…
-
3
votes2
answers122
viewsIs it correct in MVC to access data within the model?
In a C# MVC project, it is correct to access data within the model? For example: public class Cliente { public int Id { get; set; } public string Nome { get; set; } //outros atributos... public void…
-
3
votes1
answer999
viewsPython, Django with multiple databases
To work with multiple databases in the Laravel framework, once configured all the connections in the configuration files, just define in the model which connection to the database that model will…
-
2
votes0
answers139
viewsWhat is the best technique to use Viewmodel with C#mvc lists?
I have two templates: event registration package and registration package, where the event registration package template has a list of registration packages (see code below, removed some fields).…
-
2
votes1
answer700
viewsModel field processing before writing to the database (Python + Django)
I am trying to perform a password encryption using Python 3.7 and Django 2.1. Looking at the documentation of Python, Django and some answers here in Stackoverflow, I arrived at the code as follows,…
-
2
votes1
answer39
viewsDiagnostic analysis in mixed effects models via Plot Half-Normal chart
I am intending to perform the Plot half-normal chart for a mixed effects model that has been adjusted using the package lme4. To visualize the diagnostic analysis of this model, I intend to use…
-
2
votes1
answer36
viewsHeterocesarean mixed effects model via lmer function
I am adjusting a mixed effects model which due to observed heterocedasticity was necessary to include an effect to accommodate it. For this purpose, using the function lme package nlme this was easy…
-
1
votes1
answer286
viewsCakephp 3 - How to do rollback
In cakephp 2 in birds transactional with $data_source->begin(); ,$data_source->commit();, or $data_source->rollback();. So when I needed to insert into more than one table, and the data was…
-
1
votes1
answer337
viewsWhat is the most appropriate way to instantiate a database in an MVC standard
I’m studying POO and a little bit about the MVC structure, and I’m wondering where to create and instantiate the database to be used in the entire application, thought as the Model relates to data…
-
1
votes1
answer49
viewsUpdate only a property of an object using Outputcache in Actionresult
Hello, everybody. I’ve got a problem I don’t even know if there’s a solution like this. I have an Actionresult that returns the contents of a chart in Jquery. The result of this chart will always…
-
1
votes2
answers23
viewsCan I create a model responsible for more than one table in Laravel?
I wonder if I can create a model that returns the result of more than one table in Laravel.
-
1
votes0
answers718
viewsSpring+JPA, visible Transient field in View and not persistent?
Good evening guys, I have a filter that I do manually with @query() that in it I make a total calculating Join of a sale ie, SUM(valor * quantidade) as total At the end I’ll put the filter for…
-
1
votes0
answers37
viewsSend multiple checkbox via model to Controller
I have a class: public class TreeViewConfigVm { public string plant_selected { get; set; } public List<SelectListItem> criticality { get; set; } public List<SelectListItem>…
-
1
votes1
answer101
viewsMVC and JAVA doubt
Giving continuity to a project of the college that was stopped, I intend to do it in Java already I did and I remade from scratch about 2 times however, it was horrible and to each class I realized…
-
1
votes2
answers102
viewsHow to relate two classes in the same Model Django
hello, I am new to Django and I am trying to get information related to two different classes, with 1 variable as "base" for it. In case I have the Customer and Order class, and I would like to…
-
1
votes0
answers90
viewsSeparate related models in Sqlalchemy
I have a model of relational tables: models/Base.py from collections import OrderedDict from src.config.database import db class Base(db.Model): __abstract__ = True models/Model.py from .Base import…
-
0
votes1
answer444
viewsAutomapper Relationship one for many - Model to Viewmodel (and vice versa)
MVC scenario, where Controller talks to Application who talks to Domain. I’m trying to map one to many with Automapper. This is my Model: public class Estado { public Guid EstadoId { get; set; }…
-
0
votes0
answers246
viewspermission of Django
Good afternoon, I am wanting in the template to make a loop to disable a button according to the custom permission .. The model code is: # -*- coding: utf8 -*- from __future__ import…
-
0
votes0
answers262
viewsHow to check in the API if a user being searched in the database is the user who is logged in?
I am using Laravel and I need to create an attribute (is_me) in the model to know if the current profile belongs to the user who is logged in; I was doing as below, but now that I am using API I can…
-
0
votes2
answers46
viewsHow do I complete information that is in a complex JSON type?
I am trying to carry out the filling of a Icollection type that is owned by my Professional model. When performing the request I pass the information via JSON But in VS debug and GET the information…
asp.net-mvc json entity-framework relational-model modelasked 6 years, 2 months ago Fabricio Pereira Cardoso 33 -
0
votes1
answer227
viewsWhat are Django’s view, serializer and model settings?
I’m studying the 'Django' and would like to understand the definitions view, serialize and model and which route between them. Thank you
-
0
votes2
answers58
viewsException Handling at MODEL
How do I send an exception of the Model to View in the form of an Alert, for example MODEL : Try { // codigo }catch{ // Aqui quero tratar o erro e mandar uma mensagem pra ser exibida na view em…
-
0
votes2
answers791
viewsDjango Models - Foreignkey how to call method within the class by Admin
Good afternoon Galera, My situation is as follows. I have a nested class structure for a solution and I’m stuck in the following situation: I have these class structure: class…
-
0
votes1
answer117
viewsArray saving data in the database with a field written array
I have two fields saved in the database (in this case it would be as a comment on the request in the Brazilian language, but that doesn’t matter much). These fields are being saved correctly, but…
-
0
votes1
answer314
viewsPHP MVC - How to run Model methods?
Good afternoon! How do I execute a method of the Model class, in specifying an insertion method to the BD, in case I need to send the Form data. This is the form in View (sector.php): <form…
-
0
votes0
answers25
viewsHow to change the Model data being shown in Gridmvc?
I have a Gridmvc in my form where displays a list of units, in this grid has a text field, and a checkbox, I would like when the user type some text box or catch the check, this change reflected in…
-
0
votes1
answer164
viewsIs it correct to use get/set and other methods in the model of the Laravel?
Example: In the model: public function getProduct() { return $this->where('price',100)->get(); } public function checkProduct($price) { if($price > 100){ return $price; } } On the…
-
0
votes0
answers13
viewsCakephp returns error in Sqlite database Cannot describe users. It has 0 Columns
Please, Using Cakephp 4.2.5, I have an sqlite database of 3 tables and are not empty. When I do on controller: $usersTable = TableRegistry::getTableLocator()->get('Users'); $query =…
-
0
votes1
answer1574
viewsTrying to get Property 'name' of non-object Laravel Eloquent Error when pulling foreign key data
I am trying to use relationships to show data on screen but I get the following error: Trying to get Property 'name' of non-object In this command…
laravel laravel-eloquent laravel-blade foreign-key modelasked 6 years, 9 months ago Gabriel Alves 41 -
0
votes0
answers135
viewsRecover Partial View values for Parent View
I’m developing a screen in Aspnet Mvc where I have an index screen that has a model called Parametrizacaovm and on that screen I have a partialView that displays the drives (which is a…
-
0
votes1
answer123
viewsPopular a View with values in the ASP.NET MVC model
In the Index Method I can set values in the model and initialize my VIEW with predefined value. But when I do the POST for the START method, when I change the Aquedica property, the value is not…
-
0
votes1
answer219
viewsCalculating a date inside the Model Django timedelta
I am declaring a function (data_prox_prog) to calculate a future date and store in the model, but it is not happening as expected. Follows code: class ProgressaoDocente(models.Model): servidor =…
-
0
votes1
answer50
viewsAngular: error in model with object listing
I have these 2 models, and the book has a list of language-like objects. Model book import { Language} from "./language"; export class Book { id: number; name: string; language:…
-
0
votes1
answer50
viewsJava spring: error removing model listing object
I am having problems in the construction of the relations between the models of a project, I have a document that has several subcategories. When I save a document I want to do a validation, which…
-
0
votes1
answer96
viewsWhere should I put the model classes (POCO) in a C#Solution?
Currently my Solution is organized more or less like this: View (Windows Forms) DAL (Data access, return business entities) BLL (business rules in general) Model (POCO’s representing any business…
-
0
votes1
answer302
viewsHow to remove all items from a Many-to-Many relation in Django?
I have the following models in my Django app: class Tag(models.Model): name = models.CharField(max_length=150) description = models.TextField(null=True, blank=True) created_at =…
-
0
votes0
answers25
viewsCreate a web form model
I’m putting together a web page with . Net Core and I have a web form that has many fields and I was thinking about how to get all this information filled out more dynamically, I asked a question…
-
0
votes1
answer87
viewsTaking values from a form using a model
I’m creating a web form and I’ve been told here at Sopt to use a model, since I’m using . Net Core Razor. I am trying to create the model, to pass parameter but I cannot recover the values of the…
-
0
votes1
answer344
viewshow to do total in list elements Python Django
Enter primary data (raw data)where it has values . Flot and I am already calculating the total in function "totalv2" ta run class Funcionario(models.Model): Custocoleta = models.Decimalfield(…
-
0
votes2
answers145
viewsProblem with table data insertion via Aravel
I have a project in Laravel at the same time I learn to use the framework, I need to insert a certain value in a table field, for this there is a condition I put in the controller: public function…
-
0
votes2
answers167
viewsEloquent: Relationship (JSON) -> Hasmany and Belongsto
Say guys all right? Next, I have a little problem related to two models within my project. First Model I have a relationship hasOne: <?php namespace App; use Illuminate\Database\Eloquent\Model;…
-
0
votes2
answers331
viewsAdonis make:model generating model with different name
I executed the Adonis command make:model Caredperson -mc so that the controller and Migration were created together. After executing the command, I tried to change the name of the model, Migration…
-
0
votes1
answer76
viewsHow to organize Services and Repositories in a MVC application?
I have a REST API application in Nodejs already organized in MVC, but I still don’t understand how to use the services and repositories in practice. Please help me to separate the layers? //MODEL…
-
0
votes0
answers17
viewsDjango Manytomany "needs to have a value for field "id" before this Many-to-Many Relationship can be used"
Hello, I’m trying to assign data in a model that contains a Manytomany field... Reading around I understood that first should instantiated the Model creating it and passing the data with exception…
-
-1
votes1
answer123
viewsMEAN STACK: Mongoose model blocks communication with my controller
Man controller does not send data to my router when mine Model is being exported in the application and I don’t know why it happens. controller js. var Model = require('../models/dado.js');…
-
-1
votes1
answer52
viewsWhat size to use for imported 3d models in Unity 3D?
I’m starting a new project in Unity 3D using free 3d models from the internet, I imported a building but when I opened in Unity it was gigantic compared to the standard character of Unity! My…
-
-1
votes1
answer710
viewsHow to dynamically change model data when changing the value of the list that fills it?
I have a Jtable where I have a column by the name of colun1 I want to know how I can alter Jtable’s data when any data on the list that fills it out changes. Example I have a list with listString…
-
-1
votes1
answer329
viewsWhat’s the matter with you?
Next, on my model: public function indicacao() { return $this->hasMany(User::class, 'indicacao','name'); } public function todasindicacoes() { return…
-
-1
votes1
answer24
viewsVGG16: how to use Dense_2 layer as output - python
I am using vgg16 model for feature extraction https://github.com/fchollet/deep-learning-models/blob/master/vgg16.py call the same through function: model = VGG16(include_top=True,…
python classification image-processing model deep-learningasked 4 years, 7 months ago David Jordão 21