Part of the MVC pattern, the Model manages the behavior and data of the application.

learn more… | top users | synonyms

0
votes
0answers
3 views

MVC3 - How should I crete a List of Models and using them as attribute value of another Model?

I have to create a kind of many-to-many relation between my models. For example I should create a number of School entities in my db and then, as I create a Student entity, I should be able to select ...
0
votes
1answer
15 views

cakephp: no save, no validate errors, no callbacks, empty sql log

In my controller i have this add function: public function add(){ $this->layout = false; if($this->request->is('post')){ $this->Paciente->create(); ...
0
votes
1answer
24 views

How can I get a list from model for the template

in the models.py, I have a model which has a list attribute: Class Controller(models.Model): def controller(self): result = [] #...do some works here... result = xxx Now ...
0
votes
1answer
17 views

Using Entity Framework Model First with Asp.Net Membership Provider

I am currently using MVC4 and entity framework model first. I was wondering how I am supposed to associate the asp.net membership provider tables with entity framework models. I tried adding ...
0
votes
0answers
38 views

Limit the number of results while looping through Laravel relation

I have a model beat.php that extends Eloquent and has a function public function posts() { return $this->belongsToMany('Post')->withPivot('deleted_at')->orderBy('created_at', 'desc'); } ...
-1
votes
0answers
18 views

How to create such form: each db record has selection, with django forms?

I've got such case: where form labels: apples lemons strawberries comes from database. I started with this: fruits = models.Fruit.objects.all() # like: apple, lemon, strawberry choices = ( ...
1
vote
0answers
17 views

maximum recursion depth exceeded on Django model when creating

I have this strange problem with one of my Django models and I was able to fix it but don't understand what is happening. These are the models: class Player(models.Model): facebook_name = ...
0
votes
1answer
31 views

CakePHP Model instances confusion

After debugging quite a bit, I noticed a really strange behaviour inside of CakePHP's (2.x) Model usage: When I changed the Model ID and used read(), on a completly different object instance with a ...
0
votes
0answers
22 views

Struts2 Model Driven return Stream

In my Action, I implemented ModelDriven to return JSON String. But when I want to return an InputStream, I can't. How can I do? @Override public Object getModel() { if (json.size() > 0) { ...
0
votes
0answers
11 views

Why we use Dimensional Model over Denormalized relational Model?

I am confused in some questions. I need their answers. If our relational model is also De-normalize then why we prefer dimensional model ? What is the reason we prefer dimensional model over ...
0
votes
1answer
16 views

Rails 4 .where nested model search

Hi, I have a Model of Users and a Model of Products. My Model Products belongs_to my Model User and a User has_many Products. My question is how can i search 1 or multiple products matching a user ...
0
votes
1answer
50 views

Define a counter type column in django models using cql engine

I have a model with counter type column as below: from cqlengine import columns from cqlengine.models import Model class CountView(Model): entryLink=columns.Text(primary_key=True) ...
1
vote
1answer
20 views

Convert three.js model(s) to svg

I am trying to build a tool which allows the designers to import 3d models (created in 3ds max and converted to three.js json) of parts of furniture and assemble the furniture using these parts by ...
0
votes
0answers
21 views

symfony annotations validation override entities/models

I'm trying to override the entities validatation of a forum bundle. I do it like this: Category entity: //src/MSD/ForoBundle/Entity/Category.php namespace MSD\ForoBundle\Entity; use ...
0
votes
2answers
21 views

Laravel model getting instances of the class

I am developing a package in the workbench environment. I have a model like <?php namespace Vendor\Webshop\Models; use Vendor\Webshop\Models\Country as Country; use ...

1 2 3 4 5 398
15 30 50 per page