[Nitro] [ANN] Nitro + Og 0.22.0

Robert Wagner robbie.wilhelm at gmail.com
Mon Aug 8 13:20:58 EDT 2005


hi,
i'm trying to og my legacy tables with the new reverse feature:

class Person
	property :id, Fixnum
	property :title, String
	property :fname, String
	property :lname, String
...
	set_table :efa_persons
	set_primary_key :id
	has_many Note
	belongs_to Company, :field=>:company_id
end

p=Person[1]  # thats me

# sql ist right but it
# gives me an error:

DEBUG: SELECT * FROM efa_persons WHERE id=1
/usr/lib/ruby/1.8/yaml.rb:119:in `load': parse error on line 0, col
19: `t/string/unix_ ' (ArgumentError)
        from /usr/lib/ruby/1.8/yaml.rb:119:in `load'
        from (eval):4:in `og_read'
        from /usr/lib/ruby/gems/1.8/gems/og-0.22.0/lib/og/store/sql.rb:881:in
`read_one'
        from /usr/lib/ruby/gems/1.8/gems/og-0.22.0/lib/og/store/sql.rb:308:in
`load'
        from /usr/lib/ruby/gems/1.8/gems/og-0.22.0/lib/og/entity.rb:80:in `[]'
        from ogtest.rb:31

alternative:

t=db.load(1, Person)

gives

ogtest.rb:30: private method `load' called for
#<Og::Manager:0xb7ccdc10> (NoMethodError)

anybody knows whats wrong?

thanks,
   robert

2005/8/7, George Moschovitis <george.moschovitis at gmail.com>:
> Hello everyone,
> 
> * The much requested Og 'reverse mode' is implemented. Og's
> domain specific language and API is extended to allow fine-grained
> customization of the schema-to-objects mapping. Og can now handle
> most of the legacy schemas you can throw at it. Here is an
> example:
>




More information about the Nitro-general mailing list