From george.moschovitis at gmail.com Tue Feb 1 10:54:21 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Feb 2005 17:54:21 +0200 Subject: [Nitro] [ANN] Nitro + Og 0.9.3 Message-ID: Hello everyone, new versions of Nitro and Og were just released. Homepage: http://www.navel.gr/nitro Download: http://www.rubyforge.com/projects/nitro A *very* important release. A new abstract rendering pipeline is introduced. This pipeline allows for multiple adaptors (WEBrick, fastcgi are included). Many classes have be rewritten using *clean* code, and the directory structure has improved again. All unused and obsolete files have been removed. A new version of the Blog example was included. This version does not use XSLT and runs on Windows. If you havent seen Nitro or you had problems with an earlier version, this is the time to revisit this project! Most notable additions: * Improved Windows compatibility. * Drastically improved source code readability. * New abstract rendering pipeline. Benefits: * multiple adaptors. * better unit tests. * optimized memory allocation. * more modular desing. * FastCGI support (tested with Lighttpd). * no_xsl_blog example. This new example is easier to setup, even on Windows. This also demonstrates that Nitro does NOT force the use of XSLT. * No global variables used for nitro configuration. * Updated the docs to better reflect the rappidly evolving codebase. * Og metalanguage relations insert metadata into the target class, useful for advanced scaffolders. * Og refer_to meta-language command. * Many bug fixes and small optimizations. The next version will stabilize the Nitro api. Nitro is an efficient, yet simple engine for developing professional Web Applications using the Ruby language. Nitro aims to provide a robust infrastructure for scalable web applications that can be distributed over a server cluster. However, Nitro can also power simple web applications for deployment on intranets or even personal computers. Nitro integrates the powerful Og Object-Relational mapping library. Nitro is a multiparadigm application framework and will integrate ideas from Rails, Wee, PHP, JSP and .NET Nitro integrates the Og (ObjectGraph) object-relational mapping library. Og provides transparent serialization of object graphs to a RDBMS backend. Unlike other similar libraries Og maps standard Ruby objects to SQL tables and not vice versa. Og provides a meta language to describe the relations between objects, a flexible and intuitive api for querieng the database, raw access to the SQL language if needed (for example to fine tune the automatically generated SQL tables, or for custom queries), suports deserialization to Ruby objects or tuples, automatically generates join tables for many_to_many relations and provides a collection of usefull Mixins to synthesize common Entities. Og is a combination of the best features of Active Record and the former O-R mapping library included in Nitro (NDB). Adapters for PostgreSQL and MySQL are included. I would really appreciate your suggestions, ideas and bug reports. I hope this software will be useful for you. have fun, George Moschovitis -- www.rubyforge.com/projects/nitro www.joy.gr From rblists at gmail.com Sun Feb 6 06:52:51 2005 From: rblists at gmail.com (Raphael Bauduin) Date: Sun, 6 Feb 2005 12:52:51 +0100 Subject: [Nitro] Og and existing databases Message-ID: Hi, as suggested by Georges on c.l.r, I subscribed to this list to discuss the possibility of using Og with an existing database, in the way ActiveRecord can be used. Are there examples somewhere? What are the conventions used by Og? I'm also interested in using several databases in the same web application. Is that easy with Og? Thanks for your help Raph From jamesUNDERBARb at neurogami.com Sat Feb 12 00:55:07 2005 From: jamesUNDERBARb at neurogami.com (James Britt) Date: Fri, 11 Feb 2005 22:55:07 -0700 Subject: [Nitro] Creating an app with an exising database Message-ID: <420D9A3B.2050508@neurogami.com> I'm still poking my way through some code, and I may have missed the obvious answer, but how I can create a new Nitro app that points to an existing database? Thanks, James Britt From george.moschovitis at gmail.com Sat Feb 12 03:28:04 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 12 Feb 2005 10:28:04 +0200 Subject: [Nitro] Creating an app with an exising database In-Reply-To: <420D9A3B.2050508@neurogami.com> References: <420D9A3B.2050508@neurogami.com> Message-ID: At the moment there are two ways: - the existing database should use the Og naming conventions, or - you use low level sql queries. I haven't tried it but I think you can use various options of the Og metalanguage to adapt the naming conventions to much your existing database. If you want, please email me your existing database schema by email and I 'll show you how to do it (or add some extra options in Og to do it). Btw, the next version of Og introduces a total rewrite of the backends system, now called adapters (in sync with nitro's adapters), with many fixes/improvements to the psql/mysql adapters and a brand new sqlite3 adapter. I filesystem only adapter is also planned. I also removed the no-deserialize mode, since it seems not that useful in retrospect. regards, George. On Fri, 11 Feb 2005 22:55:07 -0700, James Britt wrote: > I'm still poking my way through some code, and I may have missed the > obvious answer, but how I can create a new Nitro app that points to an > existing database? > > Thanks, > > James Britt > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- www.rubyforge.com/projects/nitro www.joy.gr From george.moschovitis at gmail.com Tue Feb 15 05:45:32 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 15 Feb 2005 12:45:32 +0200 Subject: [Nitro] [ANN] Nitro + Og 0.10.0 Message-ID: Hello everyone, new versions of Nitro and Og were just released. Download: http://www.rubyforge.com/projects/nitro Another strong release featuring a completely recoded Og implementation and redesigned Og adapter (formely backend) system. An SQLite3 adapter is also provided. Moreover the Nitro installation process is improved, and many small changes make the framework more elegant and easier to use: the updated examples reflect this! Most notable additions: * Improved Og implementation (cleaner code) and new Og adapter subsystem. * New SQLite3 Og adapter, improvements in MySQL and PostgreSQL adapters (WARNING: needs version 1.1.0 of Sqlite3-Ruby). * Added install.rb for easier installation of the tar.gz distribution. * Better GemSpec for easier installation by RubyGems. * Action/template/xsl auto-reloading system in debug mode, new implementation, works again. * New Nitro configuration system, with rational default parameters. * --console option attaches an irb session to a running instace of an application (works again). * Og supports optional typechecking by using property metadata. * request alias for context to be compatible with older versions of nitro and Webrick/jsp and other frameworks. * Improved the examples, cleaner code, work from any directory. * Removed more obsolete code and improved directory structure. * and many more smaller fixes. -- www.rubyforge.com/projects/nitro www.joy.gr From mneumann at ntecs.de Tue Feb 15 06:26:17 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Tue, 15 Feb 2005 12:26:17 +0100 Subject: [Nitro] Re: [ANN] Nitro + Og 0.10.0 In-Reply-To: <1108463580.653047.286680@f14g2000cwb.googlegroups.com> References: <1108463580.653047.286680@f14g2000cwb.googlegroups.com> Message-ID: <4211DC59.3050806@ntecs.de> George Moschovitis wrote: > Hello everyone, > > new versions of Nitro and Og were just released. > > Homepage: http://www.navel.gr/nitro > Download: http://www.rubyforge.com/projects/nitro > > Another strong release featuring a completely recoded Og implementation > and redesigned Og adapter (formely backend) system. An SQLite3 adapter > is also provided. Moreover, the Nitro installation process is improved, > and many small changes make the framework more elegant and easier to > use: the updated examples reflect this! > > Most notable additions: > > * Improved Og implementation (cleaner code) and new Og adapter > subsystem. > > * New SQLite3 Og adapter, improvements in MySQL and PostgreSQL adapters > (WARNING: needs version 1.1.0 of Sqlite3-Ruby). Wow. That's very good news. That makes database examples much easier, as everyone will be able to try them without installing and configuring Mysql or Postgresql. Thanks! How to install the SQLite3 library? Could you give the gem name? Hm, just an idea: Make a "og-sqlite3" meta gem, which serves just for installing the SQLite3 dependencies. > * Added install.rb for easier installation of the tar.gz distribution. > > * Better GemSpec for easier installation by RubyGems. > > * Action/template/xsl auto-reloading system in debug mode, new > implementation, works again. > > * New Nitro configuration system, with rational default parameters. > > * --console option attaches an irb session to a running instace of an > application (works again). Could you explain how this works and how this can be useful (I'm sure it *is* useful, but I don't know exactly what it is ;-). > * Og supports optional typechecking by using property metadata. Can you give a little example? Regards, Michael From gm at navel.gr Tue Feb 15 06:43:12 2005 From: gm at navel.gr (George Moschovitis) Date: Tue, 15 Feb 2005 13:43:12 +0200 Subject: [Nitro] Re: [ANN] Nitro + Og 0.10.0 In-Reply-To: <4211DC59.3050806@ntecs.de> References: <1108463580.653047.286680@f14g2000cwb.googlegroups.com> <4211DC59.3050806@ntecs.de> Message-ID: <1108467792.3330.10.camel@slude.navel.gr> Please see the answer in RubyTalk! On Tue, 2005-02-15 at 12:26 +0100, Michael Neumann wrote: > George Moschovitis wrote: ... > Regards, > > Michael > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -- web: http://www.navel.gr tel: +30 210 6898050 fax: +30 210 6898437 From george.moschovitis at gmail.com Wed Feb 16 06:21:05 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 16 Feb 2005 13:21:05 +0200 Subject: [Nitro] Re: pj.jam.stack.ruby.nitro In-Reply-To: <4213148D.6070103@lazaridis.com> References: <1108463580.653047.286680@f14g2000cwb.googlegroups.com> <42122DB5.4040303@lazaridis.com> <4213148D.6070103@lazaridis.com> Message-ID: Ilias, I 'll try to give you an idea, how Nitro/Og can fullfil your requirements: IDE -> Nitro/Og does not provide or require an IDE. You can use the IDE that suits you. I plan to take some effort to make it play nicely with the Macromedia/Adobe tools. Analysis&Design * OOAD - Think, Analyze and Design in a straight Object [or component] Oriented way -> Supported * Use of metadata within the design (on text level [code file]) -> Supported * Fully synchronized Code level and/or Visual design. -> Not available Code Generators * Use of predefined and user defined code generators -> Supported at run time or development time, Nitro/Og generates most of the code for you. Deployment * Initial design runs on local client. -> Supported (Webrick, SQLite3) * Ability to transform design to run on higher grade systems o High Load Systems (load balancing, clustering ) o large scale OODBMS -> Supported (FastCGI, Postgresql, Oracle) * Ability to transform design to run on embedded devices. -> Partially supported (Webrick, Ruby on WinCE) Persistency * Persitency layer results directly out of the Object Model -> Supported (Og) * No need to deal with persitency tools, xml-config-files etc. -> No configuration at all, use standard Ruby objects. * Provides persistence-design-metadata o accessible by code-generators o accessible by runtime -> Supported (prop_accessor mechanism) * Flexible Technology usage o RDBMS or OODBMS o Embedded within app o or on seperate server -> Supported, Og uses RDBMS backends to emulate an OODB environment. * Easy migration mechanisms o Technology A to B o Vendor A to B -> You can switch backends (for example go from Mysql to Postgres) by changinf a single line. Automation -> Automation / Code generation is the main feature. License and Standards Requirements -> BSD licence Hope this answers some questions for you. It would be great if you can take your time and have a look at tha actual distribution code. best regards, George. -- www.rubyforge.com/projects/nitro www.joy.gr From ilias at lazaridis.com Wed Feb 16 06:55:28 2005 From: ilias at lazaridis.com (Ilias Lazaridis) Date: Wed, 16 Feb 2005 13:55:28 +0200 Subject: [Nitro] Re: pj.jam.stack.ruby.nitro In-Reply-To: References: <1108463580.653047.286680@f14g2000cwb.googlegroups.com> <42122DB5.4040303@lazaridis.com> <4213148D.6070103@lazaridis.com> Message-ID: <421334B0.6080508@lazaridis.com> George Moschovitis wrote: > Ilias, > > I 'll try to give you an idea, how Nitro/Og can fullfil your requirements: [...] Thank you for your answers. Your systems sounds very intresting. > Hope this answers some questions for you. It would be great if you can > take your time and have a look at tha actual distribution code. I'll take time to make a trial use of your product from a user perspective shortly. cu! [For today, migraine headache forces me to shut the machine down] > best regards, > George. . From george.moschovitis at gmail.com Wed Feb 16 07:35:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 16 Feb 2005 14:35:47 +0200 Subject: [Nitro] Re: pj.jam.stack.ruby.nitro In-Reply-To: <421334B0.6080508@lazaridis.com> References: <1108463580.653047.286680@f14g2000cwb.googlegroups.com> <42122DB5.4040303@lazaridis.com> <4213148D.6070103@lazaridis.com> <421334B0.6080508@lazaridis.com> Message-ID: > I'll take time to make a trial use of your product from a user > perspective shortly. Thanks, I 'll wait for your comments and suggestions. regards, George. -- www.rubyforge.com/projects/nitro www.joy.gr From ilias at lazaridis.com Thu Feb 17 13:32:58 2005 From: ilias at lazaridis.com (Ilias Lazaridis) Date: Thu, 17 Feb 2005 20:32:58 +0200 Subject: [Nitro] [EVALUATION] - E02 - Nitro, a Ruby Based WebFramework Message-ID: <4214E35A.8020500@lazaridis.com> [EVALUATION] - E01: The Java Failure - May Ruby Helps? http://groups-beta.google.com/group/comp.lang.ruby/msg/a19cd745a209b91a - [I ask the Community friendly to not intervene with off-topic postings. Of course I cannot demand that anyone keeps those essential usenet rule. As a reminder, the standard off-topic marker is "[OT]"] - I got an very intresting answer to my evaluation-stack within the nitro-general mailinglist. I like to ask Mr. George Moschovitis to take the effort to repeat his answer here in c.l.ruby. I've copied the current version for your convenience into this message. [please, if it is possible, do not delete parts of the text, but answer simple with "not-available" or similar] - - - jamStack - Technology Collection [V0.4 - draft] This is the main page of the fictive technology collection jamStack, which serves as an evaluation template for real live technology and tools collections. IDE An IDE is not contained in this technology stack. An IDE supports this technology stack (and possibly adds/enhances some of the functionality). Analysis&Design * OOAD - Think, Analyze and Design in a straight Object [or component] Oriented way * Use of metadata within the design (on text level [code file]) * Fully synchronized Code level and/or Visual design. Code Generators * Use of predefined and user defined code generators Deployment * Initial design runs on local client. * Ability to transform design to run on higher grade systems o High Load Systems (load balancing, clustering ) o large scale OODBMS * Ability to transform design to run on embedded devices. Persistency [An evaluation template for ObjectRelationalMapper (ORM) can be found within jamORM.] * Persitency layer results directly out of the Object Model * No need to deal with persitency tools, xml-config-files etc. * Provides persistence-design-metadata o accessible by code-generators o accessible by runtime * Flexible Technology usage o RDBMS or OODBMS o Embedded within app o or on seperate server * Easy migration mechanisms o Technology A to B o Vendor A to B Security * Flexible security system o Security inheritance o Plugable security systems * Supports several encryption strengths GUI / Webinterface * Exchangeable GUI System * GUI is decoupled from Business Objects * Automated creation of Objects [Components] webinterfaces o display Objects o create Objects o edit Objects Visual Modeling * Use of UML to model the design * Code level defined metadata is available/editable within UML tool * Uses same code-generators that are used within IDE / Command-Line Automation * All production steps should be automated or semi-automated. * Automation is based on user-defined rule-systems. * Manual processing can always override automations. License and Standards Requirements The combined technologies include one or more programming languages and should fulfill whenever possible the following prioritized basic requirements: [For programming languages: at minimum the "execution environment" or "runtime".] * Based on Open Source (FSF freedom, OSI extensibility) * Based on Open Standards * Platform independent * Language neutral Examples * ODMG - object persistence * CORBA - distributed systems * ... . -- http://lazaridis.com From george.moschovitis at gmail.com Wed Feb 23 09:03:05 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Feb 2005 16:03:05 +0200 Subject: [Nitro] Fwd: Og scaffolding In-Reply-To: References: Message-ID: Hello Michael, just took a break from my Job and played a bit with Og. I tried to add the functionality you want for the scaffolder. Here is how it works: class Article property :title, String property :body, String has_many :comments, Comment has_many :categories, Category end class Comment belongs_to :article, Article end Article.__props => [Property(:title), Property(:body)] Article.__meta[:has] => [ [:comments, Comment, :article_oid], [:categories, Category, :article_oid]] Comment.__meta[:belongs_to] => [[:article, Article]] All arrays are sorted. Is this ok with you? I 'll probably come up with a better interface to those arrays. Let me know, what you think George. ps: and I added the property alias :) -- www.rubyforge.com/projects/nitro www.joy.gr From george.moschovitis at gmail.com Wed Feb 23 09:35:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Feb 2005 16:35:15 +0200 Subject: [Nitro] Re: Og scaffolding In-Reply-To: <421C9198.3020900@ntecs.de> References: <421C9198.3020900@ntecs.de> Message-ID: > Now, I'd like this behaviour: > > Article.__meta > # => [Property(:title), Property(:body), HasManyRelation(:comments), > HasManyRelation(:categories)] > > You could make the HasManyRelation a subclass of Property (or Attribute). > > a = Article.__meta.first > # => Property(:title) > > a.type > # => String > > a.additional_meta > # => {} would return all specified hash key/values, e.g. {:ui => ... } > > Article.__meta[2].foreign_class > # => Comment > > Something like this. It's much nicer to have all in one place, and be > able to query the objects for further information. Ok, will do it like this. -g. -- www.rubyforge.com/projects/nitro www.joy.gr From mneumann at ntecs.de Thu Feb 24 03:47:37 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Thu, 24 Feb 2005 09:47:37 +0100 Subject: [Nitro] Re: Og scaffolding In-Reply-To: References: <421C9198.3020900@ntecs.de> Message-ID: <421D94A9.1030208@ntecs.de> I CCed to nitro at . George Moschovitis wrote: > Here you are, > > class Article > property :name, String > property :age, Fixnum > has_many :comments, Comment > end BTW, have you tried this: class Article has_many :comments, Comment property :name, String property :age, Fixnum end The last time I tried it, it did not worked due to method #has_many not being declared. Would be nice if you could fix this. > class Comment > property :text, String > belongs_to :article, Article > end > > par = Article.properties_and_relations > => > [Property(:name), Property(:age), Og::HasMany(:comments)] Why not Og::Property ? > par[0].klass > => String > > par = Comment.properties_and_relations > => > [Property(:text), Og::BelongsTo(:article), Property(:article_oid)] Hm, this shows :article_oid, which is IMO part of the belongs_to relation. I don't like this! I don't want to know every database column, only those properties and relations specified by the user (otherwise you should show :oid, too, but then, how would I distinugish between properties where the user can enter something, and automatically created properties, used for example for the relations). > par[1].property > => :article_oid I'd expect something like: class Attribute attr_reader :name attr_reader :klass # or type attr_reader :meta end class Property < Attribute end class BelongsTo < Attribute alias foreign_klass klass end class HasMany < Attribute alias foreign_klass klass end ... Does this make sense? Regards, Michael From george.moschovitis at gmail.com Thu Feb 24 04:00:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Feb 2005 11:00:19 +0200 Subject: [Nitro] Re: Og scaffolding In-Reply-To: <421D94A9.1030208@ntecs.de> References: <421C9198.3020900@ntecs.de> <421D94A9.1030208@ntecs.de> Message-ID: > BTW, have you tried this: > > class Article > has_many :comments, Comment > property :name, String > property :age, Fixnum > end > > The last time I tried it, it did not worked due to method #has_many not > being declared. Would be nice if you could fix this. As I said this happened because the variable: Og.include_meta_language was set to false by default to avoid Module polution. When you issued the first property, the metalanguage was automatically included. However the latest version sets this to true by default so your code works out of the box. Try it! > Why not Og::Property ? Property is not exclusive to Og. It is used by Og. > Hm, this shows :article_oid, which is IMO part of the belongs_to > relation. I don't like this! I don't want to know every database column, > only those properties and relations specified by the user (otherwise you > should show :oid, too, but then, how would I distinugish between > properties where the user can enter something, and automatically created > properties, used for example for the relations). hmm, ok will do something about this... > > par[1].property > > => :article_oid > > I'd expect something like: > > ... > > Does this make sense? of course, this is almost exactly my implementation. It works as you described (I 've in the meantime added the foreign_class alias) -g -- www.rubyforge.com/projects/nitro www.joy.gr From mneumann at ntecs.de Thu Feb 24 09:33:41 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Thu, 24 Feb 2005 15:33:41 +0100 Subject: [Nitro] Og Editing Context Message-ID: <421DE5C5.2030201@ntecs.de> Hi, Would it be possible to introduce an editing context, where you can register those objects that should be saved (with possible dependency resolving). Example: class Book; end # forward class Author property :name, String has_many :books, Book end class Book belongs_to :author, Author ... end ######## a = Author.new a.name = "Michael" b = Book.new a.add_book(b) The problem here is, that the author must exist, before we can add a book to it (add_book will store the author to the database if it's not yet saved). Problem: You can't undo this. And it's not very clear, that add_book will save the author to database. ed = EditingContext.new a = Author.new ed.add(a) a.name = "Michael" b = Book.new ed.add(b) a.add_book(b) # everything is correct linked in memory, but not yet saved to database b.author #=> a # save all registered objects. this is done in correct order, # so first a then b (the order can be infered automatically) ed.save! Alternatively, could we modify add_book so that it only assign the book.author_oid to the author object (not it's oid, as we don't have one yet), and not saves the author object to database. book.save would then query author.oid (if the author is already stored) or else raise an error. Even better, if author.save would trigger books.each {|b| b.save} in it's save method. This is *very* useful for advanced scaffolding, where you want to add e.g. a new phone-number to a person, but not save it to database, yet, as we can cancel the whole "create Person" process. Hope you get the point I'm trying to explain. Regards, Michael From mneumann at ntecs.de Thu Feb 24 11:26:32 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Thu, 24 Feb 2005 17:26:32 +0100 Subject: [Nitro] Re: Og default values In-Reply-To: References: Message-ID: <421E0038.4000804@ntecs.de> George Moschovitis wrote: > Hello Michael, > > I am trying to implement your 'default values' sugestion. > The problem is Og precalculates the insert code for each object, > so Og *has* to emmit something for each property. If I emmit NULL > the RDBMS will use the DEFAULT value? No, it will not use the default value (at least not on Postgres). It will raise an error if the column is NOT NULL. But the default value is NULL if no value was given and no default was specified. Hm, could you show how this pregenerated code looks like? Maybe this could be modified to be more dynamic (not sure how this would affect performance, but I guess it will not be noticable)? If this is not feasible, then it's better to use NULL as default value for *every* column/type. If you haven't specified a value, and a column is NOT NULL, this will raise an error. Regards, Michael From george.moschovitis at gmail.com Fri Feb 25 03:16:00 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Feb 2005 10:16:00 +0200 Subject: [Nitro] Re: Og default values In-Reply-To: <421E0038.4000804@ntecs.de> References: <421E0038.4000804@ntecs.de> Message-ID: > If this is not feasible, then it's better to use NULL as default value > for *every* column/type. If you haven't specified a value, and a column > is NOT NULL, this will raise an error. done, added :default option too... -g. -- www.rubyforge.com/projects/nitro www.joy.gr From mneumann at ntecs.de Fri Feb 25 04:26:08 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Fri, 25 Feb 2005 10:26:08 +0100 Subject: [Nitro] Re: Og default values In-Reply-To: References: <421E0038.4000804@ntecs.de> Message-ID: <421EEF30.8060302@ntecs.de> George Moschovitis wrote: >>If this is not feasible, then it's better to use NULL as default value >>for *every* column/type. If you haven't specified a value, and a column >>is NOT NULL, this will raise an error. > > > done, > > added :default option too... How does this behave? class Person property :name, String, :default => "noname" end a = Person.new a.name # => "noname" (1) # or a.name # => nil (2) Assuming case (1): a = Person.new a.name # => "noname" a.name << "-test" a.name # => "noname-test" b = Person.new b.name # => "nonanme-test" !!!!!! And for case (2): a = Person.new a.save a.reload a.name # => "noname" # okay so far, but now the error kicks in a.name = nil a.save a.reload a.name # => "noname" # still noname, even if I assigned nil # (which is a valid value) Regards, Michael