i've read a lot about ORM but wondering if there are side by side comparison examples between an ORM like doctrine and SQL so that you could see what is more easier to maintain?
couldn't find such comparisons in google.
...
Hi, I need to add paginator for my Hibernate application. I applied it to some of my database operations which I perform using Criteria by setting Projection.count().This is working fine.
But when I use hql to query, I can't seem to get and efficient method to get the result count.
If I do query.list().size() it takes lot of time and I t...
say I'm about to write an application with a thin GUI layer, a really fat calculation layer (doing computationally heavy calibrations and other long-running stuff) and fairly simple persistance layer. I'm looking at building the GUI + calculation layer in C++ (using Qt for the gui parts).
Now - would it be a crazy idea to build the pers...
class UserDatastore : IUserDatastore
{
...
public IUser this[Guid userId]
{
get
{
User user = (from u in _dataContext.Users
where u.Id == userId
select u).FirstOrDefault();
return user;
}
}
...
}
One of the d...
If I create a new Doctrine object, with lots of relations, should I save() these relations before assigning them to newly created object?
E.g.
$main = new Main();
$child = new Child();
$main->child_rel = $child; // do I need to save the child obj explicitly?
$main->save();
I assumed that parent will automatically call cascading saves,...
Just wondering if anyone has had any experience using Entity Framework 4's POCO support and how it stands up compared to NHibernate. If they're the same, I'd be very interested in making Entity Framework 4 my ORM of choice if only because it would:
Support both data first AND object first development
Have a robust LINQ provider
Be easi...
How do I configure Hibernate so that each time I call sessionFactory.openSession() it connects with a new connection from the connection pool? The connection pool is managed by Websphere Application Server and is a JDBC Data Source.
Thanks
...
I am getting following error message:
Doctrine_Table_Exception: Unknown relation alias shoesTable in /home/public_html/projects/giftshoes/system/database/doctrine/Doctrine/Relation/Parser.php on line 237
I am using doctrine 1.2.2 with Codeigniter
My Code is below: (BaseShoes.php and Shoes.php is auto generated)
------------BaseShoes-...
I have a many to may relationship CohortGroup and Employee. Any time I insert an Employee into the CohortGroup hibernate deletes the group from the resolution table and inserts all the members again, plus the new one. Why not just add the new one?
The annotation in the Group:
@ManyToMany(cascade = { PERSIST, MERGE, REFRESH })
@JoinTab...
Trying to save a model in Django admin and I keep getting the error:
Transaction managed block ended with pending COMMIT/ROLLBACK
I tried restarting both the Django (1.2) and PostgreSQL (8.4) processes but nothing changed. I added "autocommit": True to my database settings but that didn't change anything either. Everything that Google...
let's see if I can ask this in an understandable way...
I started with grails and created a domain class called user. As far as I understand, Hibernate is used to map this domain class to the database. This works pretty fine with hsqldb.
Now I tried to switch to javaDB and get an error message because the table is called "user" (which ...
I'm looking for a .Net 3.5 ORM framework with a rather unusual set of requirements:
I need to create and alter tables at runtime with schemas defined by my end-users.
(Obviously, that wouldn't be strongly-typed; I'm looking for something like a DataTable there)
I also want regular strongly-typed partial classes for rows in non-dynamic ...
Hi,
say I've got:
class LogModel(models.Model):
message = models.CharField(max_length=512)
class Assignment(models.Model):
someperson = models.ForeignKey(SomeOtherModel)
def save(self, *args, **kwargs):
super(Assignment, self).save()
old_person = #?????
LogModel(message="%s is no longer assigned to ...
How can I write a criteria to return all Orders that belong to a specific User?
public class User
{
[PrimaryKey]
public virtual int Id { get; set; }
}
public class Order
{
[PrimaryKey]
public virtual int Id { get; set; }
[BelongsTo("UserId")]
public virtual User User { get; set; }
}
return ActiveRecordMediator<Order>.Fin...
at the moment im integrating ORM (doctrine) into a MVC framework (codeigniter).
then it hit me that this was the obvious way of setting up a MVC:
the controller calls the models that are representing database tables.
look at this picture:
MVC + ORM
then i wondered, how can a MVC without ORM be real MVC? cause then the models are not...
assume that i start coding an application from scratch, is the best way to create tables when using an ORM (doctrine), to manually create tables in mysql and then generate models from the tables, or is it the other way around, that is to create the models in php and then generate tables from models?
and if i already have a database, wil...
i want to fetch information from the database using objects.
i really like this approach cause this is more OOP:
$user = Doctrine_Core::getTable('User')->find(1);
echo $user->Email['address'];
echo $user->Phonenumbers[0]->phonenumber;
rather than:
$q = Doctrine_Query::create()
->from('User u')
->leftJoin('u.Email e')
->l...
i've found one cheat sheet for doctrine: cheat sheet
but it doesn't list all methods for Doctrine_Record, Doctrine_Core, Doctrine_Query etc.
i wonder if there is a such reference?
Would be very helpful.
...
The problem here consists of translating a statement written in LINQ to SQL syntax into the equivalent for NHibernate. The LINQ to SQL code looks like so:
var whatevervar = from threads in context.THREADs
join threadposts in context.THREADPOSTs
on threads.thread_id equals threadposts...
I'm building a desktop application using hibernate 3.5 & JPA 2.0.
I have 2 jars,
the lib, which defines every entity and DAO, packages looks like this :
org.my.package.models
org.my.package.models.dao
org.my.package.models.utils
In org.my.package.utils I defined my hibernate utility class for getting EM & EMF instances, which mean...