[Nitro] Accessing a database column with two different names

Alexandre Gravem vikingtux at gmail.com
Thu Oct 26 17:54:25 EDT 2006

It may be because StorageFile has many StorageUser, as viewers:

class StorageFile
        attr_accessor :filename, String
        attr_accessor :realname, String
        attr_accessor :content_type, String
        belongs_to :owner, StorageUser
        has_many :viewers, StorageUser

        validate_unique :filename

On 10/26/06, Lars Olsson <lasso at lassoweb.se> wrote:
> Thanks George (and everybody else)!
> Maybe I'm stupid, but with your suggested model I still get some strange
> behaviour:
> sqlite> .schema ogstoragefile
> CREATE TABLE ogstoragefile (filename text, realname text, content_type
> text, owner_oid integer, oid integer PRIMARY KEY);
> Ok...
> sqlite> .schema ogstorageuser
> CREATE TABLE ogstorageuser (username text, password text, realname text,
> email text, storage_file_oid integer, oid integer PRIMARY KEY);
> Now, please explain the function of the field 'storage_file_oid' in this
> table to me.
> Sincerely
> /lasso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20061026/91e5e54f/attachment.html 

More information about the Nitro-general mailing list