orm

Why dont people simply use "Object Database"s ?

Instead of JDO , Hibernate , iBATIS why we can not simply use "Object DataBases" ? http://en.wikipedia.org/wiki/Comparison_of_object_database_management_systems ...

The right way to manage user privileges (user hierarchy)

I want to allow users of my application to add sub-users and set privileges for what each sub-user is allowed to view or do. My ideas is to have a separate PRIVILEGES table, like this: +-----------------+--------+ |privilege | value | +-----------------+--------+ |create sub users | 1 | |edit own profile | 2 | |add ne...

Entity Framework: Set back to default value

I'm trying to update an entity using a stub. This works fine for changing records, unless I try to set the value back to the default value forr the column. Eg: If the default value is 0, I can change to and from any value except zero, but the changes aren't saved if I try to set it back to zero. This is the code I'm using: var package =...

How do I set a Data Mapper object to be accessed in view with Ocular in CodeIgniter?

Previously using Ocular 0.25 I was able to set an object as a view data, that I could access in the view: like: $b= new book(); $b->get_where("id",5); $this->ocular->set_view_data("b", $b); //could be accessed in view as $b but in the new Ocular 1.0.1, when I try to set a data mapper object it gives me a blank screen, without an...

Is there any ORM tool for sql server 7.0?

I have a sql server 7.0 database and I will implement a web service above it. How do I access the data without writing any sql query? ...

Does NHibernate interoperate with Hibernate? If not is there a framework out there for both Java and .NET?

Say you had: a database a bunch of .NET Windows GUI programs a bunch of Java web applications you could use Hibernate for the Java stuff and NHibernate for the .NET stuff - but would the two actually interoperate or would they be entirely different stacks? If not then is there a persistence framework out there that lets Java and .NE...

Check invariants in hibernate mapped classes

One challenge using hibernate is that manged classes have to have a default constructor. The problem is that there is no explicit point where the class is initialized and invariants can be checked. If a class has invariants that depend on more than one property the class design gets complex. Let's start with the hypothetical green-fiel...

ORM - Create object with associations

One object's associated with many others: Example: one Post is part of one Blog, has a list of relations with Tags, and many other things..... Then I've one web form with dropdown boxes, each one filled from a custom query to retrieve only the Id and Name of that object, I am not getting ALL the object because it can have big size valu...

Hibernate unidirectional one-to-many.i'm a bit confused

Hello guys sorry if the question looks stupid to you. i have 3 tables currency (id | name) language (id| name | description) transaction (id|amount|languageId | currencyid) so i want to insert into the transaction but making sure that it doesn't insert unknown language or currency (meaning it shouldn't insert to messagetemplate if there...

When to INSERT or UPDATE with composite primary key models in ORM?

I've got a homemade ORM system that currently only supports auto-incrementing primary keys. This has worked well, but the time has come to support composite primary keys. I'm aware of the holy war between surrogate vs. composite primary keys, and I personally think there's a place for each. Anyway... :) With an auto-incrementing primary...

Files in domain model

What are the best practices for dealing with binaries in domain model? I frequently must associate images and other files with business objects and the simple byte[] is not adequate even for the simplest of cases. The files: Does not have a fixed size and can be quite large thus: Have to be streamed or buffered, preferably in asynchr...

Automatic CRUD forms generation for .net Windows Forms Applications

Hi, My question is about nHibernate, or any other ORM for .net that can do what I am looking for : for my web developements, I use Django Framework; the admin pages are automatically generated, so that you can do the CRUD operations through a GUI -- web interface -- right after having created your model. I wonder if nHibernate (or any ...

Using Grails GORM standalone

I'm currently wondering how it is possible to use the Groovy ORM Layer from Grails standalone outside of the Grails Framework. There is a Documentation Entry for doing so, but the ZIP file only links to an empty page. I downloaded Grails 1.2-M3 but I couldn't find anything in the docs either. Does anybody know what the current state is...

Entity Framework 4 vs NHibernate

A lot has been talked about Entity Framework first version on the web (also on stackoverflow) and it is clear that it was not a good choice when we already have better alternative like NHibernate. But I can't find a good comparison of Entity Framework 4 and NHibernate. We can say that today NHibernate is the leader among all .NET ORMs, b...

Django ORM: Optimizing queries involving many-to-many relations

I have the following model structure: class Container(models.Model): pass class Generic(models.Model): name = models.CharacterField(unique=True) cont = models.ManyToManyField(Container, null=True) # It is possible to have a Generic object not associated with any container, # thats why null=True class Specific1(Gen...

@SecondaryTable annotation problem

I have following model, @Entity @Table(name = "user") @PrimaryKeyJoinColumn(name="user_id") @SecondaryTables({ @SecondaryTable(name = "user_personal_details", pkJoinColumns = {@PrimaryKeyJoinColumn(name = "user_id", referencedColumnName = "user_id")}), @SecondaryTable(name = "user_address", pkJoinColumns = {@PrimaryKeyJoinColumn(name =...

Book recomendation on ORM

What is a good book(s) on NHibernate in .Net or any other ORM? ...

NHibernate many-to-one association refuses to load

I have the following mapping, the many-to-one property 'Message' has a corresponding one-to-many association in the 'RootMessage' class. <class name="IMessageReceipt" lazy="false" table="MessageReceipts" abstract="true"> <id name="Id"> <generator class="guid.comb"></generator> </id> <discriminator column="Discrimi...

.Net ORM/Business Object Framework Performance

Currently I am working with a custom business object layer (adopting the facade pattern) in which the object's properties are loaded from stored procedures as well as provide a place for business logic. This has been working well in the attempt to move our code base to a more tiered and standardized application model but feel that this ...

Using ORM with stored procedures, a contradiction?

I've inherited a web application which strictly uses stored procedures to do its job. I like the approach of making it impossible for frontend developers to break the database, but I've been tired of writing calls to SPs with plain SQLs and wanted to have something saner. While I've been looking for a decent ORM (for Perl in this case, b...