[Rails] Re: Re: AWS and array of Model
Háber János
boci at freemind.hu
Sat Jan 7 21:47:54 GMT 2006
Hi!
I think the deleted is the problem. Rails automatically convert the
"deleted" field to boolean. because WS can't convert boolean to Object
so you can get the TrueClass can't convert error.
http://wiki.rubyonrails.com/rails/pages/HowtoUseBooleanColumns
So the Rails is buggy...
Cow
Joerg Diekmann írta:
> Right. If I return a User object from my AWS, everything is cool when I
> use XML-RPC (SOAP gives me an error: Cannot map User to SOAP/OM.).
>
> However, if I return a Brand object from my AWS, I get the errors
> mentioned in the first email of this thread.
>
> I can't see a difference though in these tables that would cause this
> differing behaviour. I have added a tinyint(1) and a text field to User,
> and it still works with those fields.
>
> Perhaps I am using field names that I shouldn't?
>
>
> CREATE TABLE `users` (
> `id` int(11) unsigned NOT NULL auto_increment,
> `type` varchar(20) default NULL,
> `username` varchar(50) NOT NULL default '',
> `name` varchar(50) NOT NULL default '',
> `parent_id` int(11) default NULL,
> `email` varchar(100) NOT NULL default '',
> `updated_on` datetime default NULL,
> `created_on` datetime default NULL,
> PRIMARY KEY (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
>
>
> CREATE TABLE `brands` (
> `id` int(11) unsigned NOT NULL auto_increment,
> `name` varchar(100) NOT NULL default '',
> `abbreviation` varchar(11) NOT NULL default '',
> `description` text NOT NULL,
> `image` varchar(100) default NULL,
> `image_timestamp` datetime default NULL,
> `position` int(11) default NULL,
> `deleted` tinyint(1) NOT NULL default '0',
> PRIMARY KEY (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
>
>
More information about the Rails
mailing list