orm

What is your favorite ORM for .NET?

Possible Duplicates: What ORM frameworks for .NET Do You Like Best? Which ORM for .net would you recommend? What is your favorite ORM for .NET? Which features/tools/facilities made it special for you? ...

Repository pattern: Dynamic class generation

I would like to implement the repository pattern, having my domain classes being independent from my repository implementation. but maintain my domain classes -on schema updates using EF for example- is really expensive. Do you know someway to automatize domain classes updates based on the ORM classes? -using T4 templates or something ...

Yet again Entity Framework and FK problems.

I have an entity with two fk's. I've been trying to insert a record to the database without success. This are the approaches I've used: valuePaymentBetToAdd.BetType = db.BetTypes.First(betType => betType.Id == valuePaymentBetToAdd.BetType.Id); valuePaymentBetToAdd.Lottery = db.Lotteries.First(lotto => lotto.Id == valuePaymentBe...

Middle ground between JDBC and Hibernate?

We've been implementing Hibernate recently as a replacement for JDBC. What I like is not having to constantly write SELECT, UPDATE, INSERT statements and the associated PreparedStatement and ResultSet code. However we've been struggling with random bizarre behavior (example A) which I find hard to understand and resolve due to all the ...

How to make a relation between tables using SQLAlchemy?

Using SQLAlchemy, given tables such as these: locations_table = Table('locations', metadata, Column('id', Integer, primary_key=True), Column('name', Text), ) players_table = Table('players', metadata, Column('id', Integer, primary_key=True), Column('email', Text), Column('password', ...

Django: limit queryset to a condition in the latest instance of a related set

Hi! I have an hierarchy of models that consists of four levels, all for various good reasons but which to explain would be beyond the scope of this question, I assume. So here it goes in pseudo python: class Base(models.Model): ... class Top(models.Model): base = FK(Base) class Middle(models.Model): top = FK(Top) crea...

Design question: Filterable attributes, SQL

I have two tables in my database, Operation and Equipment. An operation requires zero or more attributes. However, there's some logic in how the attributes are attributed: Operation Foo requires equipment A and B Operation Bar requires no equipment Operation Baz requires equipment B and either C or D Operation Quux requires equipment (...

Does Django have `__not_equal`?

Does Django have a field lookup like __not_equal? (Field lookups are __exact, __contains, etc.) ...

C# approach to mapping input files dynamically

hi all, I am trying to figure the best way to map input files, such as XLS or CSV files to objects in the system. Let me expand on that a little. I have the following objects: Company Contact Each have variables variables such as: Addresses Phone numbers Emails etc The input file I can get varies, sometimes there will be column he...

Django: Can't set ForeignKey value to None from admin

I have a model Category which has a ForeignKey to a SimplePage model. null and blank are set to True. The problem is, when I edit a Category from the admin interface, I can't change the ForeignKey to --------- (Which looks like the admin's way of saying None.) The value can be None initially, and I can change it to an actual value throug...

Using Hibernate to do a query involving two tables

I'm inexperienced with sql in general, so using Hibernate is like looking for an answer before I know exactly what the question is. Please feel free to correct any misunderstandings I have. I am on a project where I have to use Hibernate. Most of what I am doing is pretty basic and I could copy and modify. Now I would like to do some...

How to design a persistent object where a generic type would be greatly helpful.

I'm creating an object that will be used to store 'known quantities' or facts. Ideally, it'd look something like: public class KnownQuantity<T> { public T Quantity { get; set; } public KnownQuantity(T quantity) { this.Quantity = quantity; } } However, this class is to become a persistent object. Currently I'm...

What is so great about ORM?

Hi, So I'm having a head against the wall moment and hoping somebody can come help either remove the wall or stop my head from moving!! Over the last 3/4 weeks I've been investigating ORM's in readyness for a new project. The ORM must map to an existing, large and ageing SQL database. So I tried Subsonic. I really liked v2 and v3 aft...

How can I duplicate a SPROC-table dependency graph after these SPROCs have been replaced with DALs implemented outside the database?

I need a solution for an enterprise environment with 100s of applications and SQL databases. A current architecture standard requires that all applications implement DALs using SPROCs. One reason for this is that, when performing ongoing migration, obsolescing or modifications to databases, dependency graphs between these SPROCs and data...

Is ORM fit for complex projects?

I've not started the ORM trip yet, because I'm not sure how it works when the project becomes very complex. What's your opinion or experience? ...

Where exactly does doctrine need PEAR Installer and Pear Package?

I'm trying to install this ORM library, but I see it requires PEAR Installer and Pear Package,where are they used? ...

Is using a root persistent class or base persistable object an architecture smell?

One of the major gripes voiced by the Alt.Net community against the Microsoft Entity Framework is that it forces you to use a Base Persistable Object for everything being stored in the database. I have two questions related to this: Is it acceptable to have a "Root Persistent Class" as the base for the domain objects in your applicatio...

How to querying across databases with grails ?

Is there a way to querying across 2 databases in grails ? Example (I made a select on two databases - works and test) : select c.crf_name, c.crf_id, ig.group_id, ig.group_name, from works.crfs c, test.item_groups ig; 1) I would like to query again...

Hibernate Mapping Through Another Entity

Consider this simple database schema: User Course StudentCourse Student +-------------+ +-------------+ +-------------+ +-------------+ | -user_id |1 *| -course_id |1 *| -course_id |* 1| -student_id | | |---->| -user_id |---->| -student_id |---->| | +--...

Alternatives for NHIbernate?

HI all, What all other libraries or frameworks we can use apart from NHIbernate? Can linq work with entites as the NHIbernate does? Can linq automatically generates entities for us? Does the Data application block come with .NET 3.5 or some separate installation is required? ...