Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the latest development on database access? ORM?

Tags:

dart

I have created a form that allows input from users. That data is sent to serverside dart code. I would like to store the data in a database.

What is the latest development on database access? ORM?

like image 774
Gero Avatar asked Jul 27 '13 07:07

Gero


1 Answers

Our team is using MongoDB database and the Dart Mongo drivers for a production application with active users.

We are also using the Objectory ORM that you might want to use. It makes the use of the database simpler.

As an example, you can define a model:

class Person extends PersistentObject {
  get name => getProperty('name');
  set name(value) => setProperty('name', value);
}

Then creating a new instance and saving it to the database goes like this:

var p = new Person()
  ..name = 'Jack Bauer';

p.save();

We've been happy with Mongo and I'm pretty sure it will serve you well too.

like image 86
Kai Sellgren Avatar answered Oct 07 '22 01:10

Kai Sellgren