class Class1  include Datamapper::Resource
  property :id, Serial
  belongs_to :class0
end

class Class0
  include Datamapper::Resource
  property :id, Serial
  has n, :class1
end

On Fri, Jan 30, 2009 at 3:57 AM, Lucas Kloster <[email protected]>wrote:

>  Hello, i'm starting with ruby and DataMapper...
> How can I define this association?:
>
>     -------------      *               1     ------------
>   |    Class0    |      < -----------    |    Class1    |
>     -------------                              ------------
>
> I need in the class1s table the class0_id...
>
> Thanks!
>
> --
> Lucas Kloster
>  [email protected]
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

<<inline: 666bbfc4e2584a314d95e11e732d98c9.png>>

Reply via email to