[DISCUSSION] Object Relational Mapping (ORM) for different programming languages

Philip Mötteli philip.moetteli at econophone.ch
Wed Oct 10 04:48:15 CDT 2007


Hi,


Am 10.10.2007 um 09:53 schrieb Ruslan Zasukhin:
> ----------------------------------------------------
> DECLARATION:
>
>     class Contact < ActiveRecord::Base
>        belongs_to :state
>     end
>
> USAGE:
>
>    Contact.find(1).state.abbreviation
> ----------------------------------------------------
>
>
> And this raise question if possible get such or similar syntax for  
> REALbasic
> or C++ or other languages that Valentina supports.
>
> And as far as I see answer is NO.
>
> BECAUSE it seems to me Ruby allow return some kind of general  
> parent Object
> class and send him any messages, i.e. Calls of methods.
>
> C++ and REALbasic are strict type languages. You cannot take  
> REALobject and
> calls method of its sub-class.
>
> May be such style possible in Obj-C.

Yes, it is.
The first part though, where he declares the relationship, has to be  
implemented in a OR-library, so that it is reflected in the db.


Re
Phil



More information about the Valentina mailing list