I have an optional part of query that needs to be executed on a certain condition. Here is the example code:
int cat = 1;
int UserID = 12;
string qry = "select * from articles";
if(cat > 0)
qry += " where categoryID = " + cat;
if(UserID > 0)
qry += " AND userid = " + UserID; //The AND may be a WHERE if first condition is fals...
Which providers are there and your experience using them
I would like to know about all possible native .net Framework Entity Framework providers that are out there as well as their limitations compared to the default Linq2Entities (from MS for MS SQL). If there are more for the same database even better. Tell me and I'll be updating th...
I have a query that deletes all rows that have been marked for deletion. There is a column in a table that is named IsDeleted. It is a boolean data type if it is true the row is suppose to be deleted along with all related rows in different tables.
If an article row is marked for deletion then the article comments, votes are also supos...
I've got some tables on my system like these:
news
--id
--title
--content
video
--id
--title
--url
album
--id
--title
Now, I need to do a many-to-many relatioship with this tables, but in a flexible way. I created a table called 'links' with the below structure:
links
--parent_entity (example: news)
--parent_id (example: 5)
--chi...
We're thinking about adding more LINQ tests for ORMBattle.NET, but have no more ideas. All LINQ tests there are checking common LINQ functionality:
Any test must pass on LINQ to IEnumerable
For any test, there must be at least one ORM, on it passes (actually it doesn't matter if it is listed @ ORMBattle or not).
Currently the goal of...
Hi,
I'm wanting to use an ORM tool for an asp.net web app I'm working on. I've put together all my classes and just want to have the data persisted. I downloaded SubSonic 3.0 and began using the simple Repository...which was brilliant. I'm new to ORM tools as my first experience commercially was the DataSets/Stored Procs world for a few...
Hello,
I have set up Auth and ACL successfully on my cakePHP app.
How, now i want to build an interface for managing the ACL's, ARO's and ACO's
ARO's and ACO's where pretty easy to build using the tree behavior.
ACL how ever got me a little messed up... especially when it came to defining the model relations.
I've named my aco and ar...
I have a query that joins 5 tables.
Then I fill my hand-made object with the column values that I need.
What are solutions here that are wide-common to solve that problem using specific tools ? are there such tools?
I'm only beginning to learn Hibernate, so my question would be: is Hibernate the right decision for this problem?
Hibern...
Do you know an ORM supporting this extension method:
public static IQueryable<TResult> Select<TSource, TResult>(
this IQueryable<TSource> source,
Expression<Func<TSource, int, TResult>> selector)
Basically, it allows to add row number (index of result in sequence) to the projection. Example of its usage with IEnumerable is here. ...
I have a "to->many" relationship in Core Data with no inverse relationship and the delete rule set to both "Nullify" and "No action" (by that I mean I've tried both with no avail)
Basically I have a MergedStation whose property subStations points to many Station objects: MergedStation.subStation -->> Station
When I call [mergedStation ...
I have been using Hibernate ORM, which is an implementation of the JPA specification to manage relational data. I have also heard of the JDO specification that supposed to do the same (manage relational data).
What are the fundamental differences between the two? Any code samples most appreciated. How does JDO integrate with other Java ...
When I use Doctrine to generate classes from Yaml/db each Base class (which includes the table definition) extends the Doctrine_Record class.
Since my app uses a master and (multiple) slave db servers I need to be able to make the Base classes extend my custom record class to force writes to go to the master db server (as described here...
Hello All...
I have one table that has composite key 'rid' and 'sid'.
For that i have made following beans to map with hibernate annotations :
WBList.java
============
@Entity
@IdClass(WBListPK.class)
public class WBList {
private int rid;
private int sid;
private String wb;
@Id
@JoinColumn(name="rid")
public ...
I have a SQLAlchemy model set up in my application that should mimic the functionality of "followers" on Twitter, ie. users have have a many-to-many relationship with eachother (both followers and following). The tables are structured as follows (sa is the sqlalchemy module):
t_users = sa.Table("users", meta.metadata,
sa.Column("id...
We're developing an application using Nhibernate as the data access layer.
One of the things I'm struggling with is finding a way to map 2 objects to the same table.
We have an object which is suited to data entry, and another which is used in more of a batch process.
The table contains all the columns for the data entry and some addi...
I'm considering taking up scala programming but i'm really concerned about what will become of my ORM based applications. I currently use hibernate as my ORM and i find it a really reliable tool. I'd like to know if there's any ORM tool as efficient but written in scala, or will hibernate work seamlessly with it. i don't want to have to ...
Geeting,
I'm using Compact Framework 3.5 and have tenatively settled on a custom build of Subsonic 3.0 to do data access. The trouble is that I am used to developing model-first but am also interested in keeping control of my DB schema. Therefore, neither ActiveRecord or Repository appears to meet my needs, and I want to use my existing...
Hi,
I'm pretty used to Django. With Django you define your models for the ORM and it takes care of generating / altering the database itself for storing the data based on the models.
In php i'm looking for a similar solution. Doctrine seems to be the standard php ORM, but, as far as I've seen, you have to write the DB and then attach t...
A frequent task I run into at work is writing scripts against pre-existing databases. Sometimes I'm connecting to Oracle, other times it might be MySql or even sql server.
What I would like is a tool which would reverse-engineer the database's tables and foreign keys and allow me to write OO-style scripts against the database. This coul...
I'm trying to use association proxy for tags, in a very similar scenario to the example in the docs. Here is a subset of my schema (it's a blog), using declarative:
class Tag(Base):
__tablename__ = 'tags'
id = Column(Integer, primary_key=True)
tag = Column(Unicode(255), unique=True, nullable=False)
clas...