orm

What is the difference between Nhibernate and SubSonic ?

I know that NHibernate is a very powerful ORM but SubSonic is not known for me. please give me a little information about SubSonic and tell me that What is the difference between Nhibernate and SubSonic ? ...

update using JPA

Hi I m using glassfish v2 and persistence in a web application. I m calling persistence codes using a normal java class file inside a web Application I can select easily using this code: - @PersistenceUnit public EntityManagerFactory emf; EntityManager em; public List fname (String id) { String fname = null; List persons ...

Hibernate: More than one relationship using the same join column

I'm using a legacy database schema with composite keys. I have an entity with two relationships and one of the join columns is shared. For example, Let's say i have a Student entity with two relationships Department and Course. Department uses dept_code column while Course uses dept_code and course_code colum. The domain model is such ...

Castle Project Active Record or Fluent NHibernate

We've been looking at using an ORM at work. Currently we are trying to way up the pro's and con's of fluent nhibernate against castle active record. We are unsure of the flexibility of each as our database isn't very conventional. It lacks foreign keys and identities on the primary keys (A little confusing but the next value is stored ...

Design pattern to organize non-trivial ORM queries?

I am developing a web API with 10 tables or so in the backend, with several one-to-many and many-to-many associations. The API essentially is a database wrapper that performs validated updates and conditional queries. It's written in Python, and I use SQLAlchemy for ORM and CherryPy for HTTP handling. So far I have separated the 30-some...

Problem in creating new objects while using sqlalchemy with database sharding.

Hi, I am using sqlalchemy(version-0.4.5) with turbogears(version - 1.0) as its orm layer, with sharded multiple databases instances at the backend. While sqlalchemy seems to support passing session/engine bound to a database as a parameter to : Quering Tables : session.query(...) function Executing native sql queries : engine.execut...

POCO support in ADO.NET Entity Framework?

Hi All, I want to manually map my Entity Classes(POCO) to the Database tables usin ADO.NET Entity framework using the XML mapping file. Is it possible to do so, as I have heard there is no POCO support in ADO.NET Entity Framework for VS2008( AM I Right?).....I want to use POCO classes in my project ad use the entity framework as an ORM....

How to handle simple mapping between two entities in ORM/Hibernate?

How best to use hibernate in a simple scenario (questions at end of the post) Lets say I have this Data Model in code: class UserGroup { int id; String name; } class User { int id; String userName; } For the User and UserGroup classes, the underyling database table will look exactly as defined by the classes above. Now, a ...

linq to sql or LLBL

Hi, I am starting big asp.net project but I could not decided LLbl or linq to sql. Can you help me? What is advantage or disadvantage of linq to sql and LLBL? Which one should I use? ...

How to prevent clash of "autonumber" field when exporting from one database to another?

Supposing I have a Person class that is persisted/loaded via hibernate: class { int PersonId; String Name; } PersonId is an "autonumber" that is generated by hibernate when saving the Person. Now lets say I made a bunch of Person's in a test database that I now want to copy over to the Production database.But, in Production database,...

How about having a SingletonModel in Django?

I'm making a very simple website in Django. On one of the pages there is a vertical ticker box. I need to give the client a way to edit the contents of the ticker box as an HTMLField. The first way that came to mind was to make a model Ticker which will have only one instance. Then I thought, instead of making sure manually that only on...

CQRS - The query side

A lot of the blogsphere articles related to CQRS (command query repsonsibility) seperation seem to imply that all screens/viewmodels are flat. e.g. Name, Age, Location Of Birth etc.. and thus the suggestion that implementation wise we stick them into fast read source etc.. single table per view mySQL etc.. and pull them out with somethi...

Exclude rows with Doctrine ORM DQL (NOT IN)

I'm building a chat application with codeigniter and doctrine. Tables: - User - User_roles - User_available Relations: ONE user have MANY roles. ONE user_available have ONE user. Users available for chatting will be in the user_available table. Problem: I need to get all users in in user_available that hasn't got role_id 7. So I ...

Hibernate pluralization

I have A MySQL database currently in production use for a CakePHP application A Java SE application accessing the same database via Hibernate, currently in development. I'm using the Netbeans "automigrate" feature to create the POJO classes and XML files (do I really need the XML files when using annotations?). As the schema is quite...

OutletORM and phpDataMapper

I've been playing around with two nice php based ORMs. OutletORM and phpDataMapper. Does anyone have experience with them? Any advantages of one over the other. It's also a good question to ask which one has a bigger user-base. ...

Discovering referers to SQLAlchemy object

I have a lot of model classes with ralations between them with a CRUD interface to edit. The problem is that some objects can't be deleted since there are other objects refering to them. Sometimes I can setup ON DELETE rule to handle this case, but in most cases I don't want automatic deletion of related objects till they are unbound man...

Fluent Nhibernate and Dynamic Table Name

Hi, I've got a parent and child object. Depending on a value in the parent object changes the table for the child object. So for example if the parent object had a reference "01" then it will look in the following table "Child01" whereas if the reference was "02" then it would look in the table "Child02". All the child tables are the sa...

Django ORM and Unicode data

I'm using following model to store info about pages: class Page(models.Model): title = models.TextField(blank = False, null = False) New data saves correctly, I'm saving Unicode data there (lots of non-ASCII titles). But when I'm performing query: page = Page.objects.filter(id = 1) page.title looks odd: u'\u042e\u0449\u0435\u0...

ASP.NET ORM for High Scalable Websites

Which is the best option for High Scalable Websites or Enterprise Applications: LBLGen .NetTiers LinqToSQL NHybernate Repository Pattern (CodePlex) If any other available let me know. ...

ORM supporting mapping of generic types

Are there ORM tools for .NET supporting mapping of generic types? I imagine at least two possible mapping scenarios: Mapping of particular generic type instances Mapping of all possible generic instances (based on constraints & other mapped types). ...