Classless tables possible with Datamapper?
I have an Item class with the following attributes:
Should we have a database independent SQL like query language in Django?
Note :
Where ORMs blur the lines between code and data, how do you decide what logic should be a stored procedure, and what should be coded?
Take the following pseudocode:
How do you handle objects that need custom behavior, and need to exist as an entity in the database?
For a simple example, assume your application sends out notifications to users when various events happen. So in the database I might have the following tables:
OOP Design: relationship between entity classes
I have at first sight a simple issue but can’t wrap my head around on how to solve. I have an abstract class Compound
. A Compound
is made up of Structures
. Then there is also a Container
which holds 1 Compound
.
Do we achieve 100% Persistence Ignorance solution if we’re not using ORM’s POCO objects to model the Domain?
Persistence ignorance is ability to retrieve/persist standard objects, where standard objects are considered as classes focused on particular business problem and thus don’t contain any infrastructure-related logic
. In DDD a Repository pattern is used to achieve PI.
Entity Framework as a type checking/verification system for database code
When I read pro and con lists of using Entity Framework (or any modern ORM really), I’m surprised that the following point doesn’t arise (self quote):
ORM: Keep entities coherent in a cache or retrieve entities each time?
We have a tricky question in a project using Java & Hibernate, with a model containing bi-directional relationships.
How do ORM’S manage CRUD operations in multi thread environment
Suppose I have code which retrieves an object and modifies it and submits it via any ORM from a web application. Below is the pseudo code:
Sorting rows off an autoincrementing primary key
Is it a bad practice to rely on an auto-incrementing primary key to sort rows in a table? A coworker and I were having an argument about this subject. We need to be able to find the last-inserted row in a table, and we have no create/update time columns (which might be considered a bad practice in itself, but that’s a different argument). We obviously can’t rely on the natural order of the rows, since that can be inconsistent. Is there anything inherently wrong with using the primary key in this way, given that it’s an immutable value?