orm

Symfony app - how to add calculated fields to Propel objects?

What is the best way of working with calculated fields of Propel objects? Say I have an object "Customer" that has a corresponding table "customers" and each column corresponds to an attribute of my object. What I would like to do is: add a calculated attribute "Number of completed orders" to my object when using it on View A but not on...

What ORM frameworks for .NET Do You Like Best?

I'm writing an application from scratch, I am not pretty sure which one to use. Microsoft Entity Framework NHibernate Gentle.NET Other Any guidance or opinions on the advantages and disadvantages of each would be helpful. ...

Subsonic\ORM on Windows CE\Mobile

Has anyone managed to get subsonic or a variant working on Windows Mobile? We cant get it to work as it has a dependency on System.Configuration. Any suggestions on an alternate ORMs that would work on a windows mobile device? ...

LinQ ORM Data Objects and Inheritance.

I'm thinking about how to do this, but I have several different shapes of Data in my Database, Articles, NewsItems, etc. They All have something in common, they all have IDs (in the DB they're named ArticleID, NewsID etc. ) They all have a Title They all have BodyText. They all have a Status They all have a DateAdded What I'd lik...

Code generators or ORMs?

What do you suggest for Data Access layer? Using ORMs like Entity Framework and Hibernate OR Code Generators like Subsonic, .netTiers, T4, etc.? ...

Creating a NHibernate object and initializing a Set

Hi, I have a Table called Product and I have the Table StorageHistory. Now, Product contains a reference to StorageHistory in it's mappings <set name="StorageHistories" lazy="false"> <key column="ProductId" /> <one-to-many class="StorageHistory" /> </set> And it works, when I retrieve an object from the ORM I get an empty ISet. ...

Database (and ORM) choice for an small-medium size .NET Application

Hi I was hoping to get some advice from the panel. I have a requirement to develop a .NET-based application whose data requirements are, in the future, likely to exceed the 4 gig limit of SQL 2005 Express Edition. There may be other customers of the same application in the future witwh a requirement to use a specific DB platform (such...

NHibernate Joined Subclass in Separate Assemblies

I have the following solution project structure: Application.Core.Entities Application.Xtend.CustomerName.Entities In the Core project I have an entity Customer defiend. In the XTend project, I have an entity defined that subclasses Customer named xCustomer (for lack of a better name at this time...). The idea here is that w...

n-tier object mapping help

Hi all. Wondering if my approach is ok or could be improved: Public Class Company private _id as Integer private _name as String private _location as String Public Function LoadMultipleByLocation(Byval searchStr as String) as List(Of Company) 'sql etc here to build the list End Function End Classs Thoughts on having...

How to use MySQL functions in Propel

I want to select records that are 1 month old or newer. The query is: SELECT * FROM foobar WHERE created_at > DATE_SUB(curdate(), INTERVAL 1 MONTH) Using Propel in Symfony, I do: $c = new Criteria $c->add(FoobarPeer::CREATED_AT, "DATE_SUB(curdate(), INTERVAL 1 MONTH)", Criteria::GREATER_THAN); What Propel generates is: SELECT...

Mapping multi-Level inheritance in Hibernate

Currently I have a structure like this: A | +--B | +--C It's mapped with one table per subclass using joined tables. For historic reasons I also use a discriminator, so the current situation is as described in Section 9.1.3 of the Hibernate manual. Question: How do I extend the mapping for a structure like this: A | +--B | | | D |...

What are "SQL-Hints"?

I am an advocate of ORM-solutions and from time to time I am giving a workshop about Hibernate. When talking about framework-generated SQL, people usually start talking about how they need to be able to use "hints", and this is supposedly not possible with ORM frameworks. Usually something like: "We tried Hibernate. It looked promising...

How do you decide on which ORM to use?

Castle Active Record? Plain NHibernate? Subsonic? Entity? Something like Nettiers? I'd like to use one, but I don't know enough to decide. Nhibernate seems over kill and complex, but widely used. Subsonic seems neat and easy. But is it stable? I have CodeSmith, and I was pointed to Nettiers, which seems neat as well, but complex too...

Which is the better .NET ORM Tool: SubSonic or WebWidgetry?

I was pointed to SubSonic (www.subsonicproject.com), but then I found WebWidgetry (www.nthpenguin.com) Before I dig into them too much I'm curious to know who's used either and what the pro's and con's might be? Thanks for the help, Jim ...

What is your opinion of nPersist?

It's a candidate to be used for our project so if anyone has used it any opinion will be appreciated. ...

What's your experience with Doctrine ORM?

What's your experience with doctrine? I've never been much of an ORM kind of guy, I mostlymanaged with just some basic db abstraction layer like adodb. But I understood all the concepts and benifits of it. So when a project came along that needed an ORM I thought that I'd give one of the ORM framework a try. I've to decide between do...

Efficiently updating database using SQLAlchemy ORM

I'm starting a new application and looking at using an ORM -- in particular, SQLAlchemy. Say I've got a column 'foo' in my database and I want to increment it. In straight sqlite, this is easy: db = sqlite3.connect('mydata.sqlitedb') cur = db.cursor() cur.execute('update table stuff set foo = foo + 1') I figured out the SQLAlchemy S...

Home-grown ORM vs. DataTables?

This is a simplification of the issue (there are lots of ways of doing things), but among applications that need to talk to a database I have usually seen one of two patterns: Object-Relational Mapping (ORM), where (usually) each table in the database has a corresponding "row wrapper" class with public properties that match the columns...

Java O/R layer for SQL server?

I've got a java server (not web based, more like a big, many-threaded standalone application) that needs to talk to a MS SQL Server database. I just worked on a different project that ported a home-grown O/R layer from oracle to SQL Server, and it ran into significant problems because of too many oracle assumptions (locking, mostly). S...

Where do I start designing when using O/R mapping? Objects or database tables?

I'm starting a new database application and I wonder if it would be better to start the design at the objects (with UML) and build the database schema accordingly, or start at the design of the database (with ER) and create the objects accordingly. What are the pros and cons of either approach? (I dont think it matters but just in case...