Top "Models" questions

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

Django model instances primary keys do not reset to 1 after all instances are deleted

I have been working on an offline version of my Django web app and have frequently deleted model instances for …

django primary-key models instances
Can Django automatically create a related one-to-one model?

I have two models in different apps: modelA and modelB. They have a one-to-one relationship. Is there a way django …

django django-models models
Using multiple PostgreSQL schemas with Rails models

I have a PostgreSQL database for my Rails application. In the schema named 'public' the main Rails models tables are …

ruby-on-rails postgresql models database-schema schema-design
Could not find the association problem in Rails

I am fairly new to Ruby on Rails, and I clearly have an active record association problem, but I can't …

ruby-on-rails activerecord associations models
Spacy link error

When running: import spacy nlp = spacy.load('en') the following is printed: Warning: no model found for 'en' Only loading …

python models spacy
Django Admin: How to display value of fields with list_display from two models which are in oneToOne relation?

I belive that the answer to my problem is simple, but I can't find it anywhere. Here is my predicament. …

django admin models one-to-one
Code Igniter Model To Model Relationship

In CI, how do you relate each other the models?I have four models right now Users, UsersDepartment, UsersToDepartment, UserStatus …

codeigniter models table-relationships
guidelines for where to put classes in Rails apps that don't fit anywhere

I'm wondering if there are any best practices about where to put non-standard Ruby files in Rails apps, those that …

ruby-on-rails ruby models organization directory
models.py getting huge, what is the best way to break it up?

Directions from my supervisor: "I want to avoid putting any logic in the models.py. From here on out, let's …

python django django-models models
Sequelize: seed with associations

I have 2 models, Courses and Videos, for example. And Courses has many Videos. // course.js 'use strict'; module.exports = (sequelize, …

javascript node.js sequelize.js models seeding