I was looking for a solution like the @Embedded from Java Persistence API. So, at first glance the name EmbeddedValue looked like the kind of feature that im looking after. Ted solution seems to work to, but I dont realy understand the diference between the Ted and Piotr solutions.
They are not the same thing? 2011/4/12 Ted Han <[email protected]> > Erm, what he's talking about isn't quite EV though is it? There's not a > record substructure to his table. This'd be a logical delineation of two > sets of properties, they're still keyed by the same primary value yeah? > > > On Tue, Apr 12, 2011 at 10:30 AM, Piotr Solnica > <[email protected]>wrote: > >> Hi Jean, >> >> What you're looking for is called EmbeddedValue and DataMapper doesn't >> support it yet. It's scheduled for 1.2.0 release and the work has >> already been started. The API will look more or less like that: >> https://gist.github.com/886807#file_dm_ev.rb >> >> Cheers >> >> # solnic >> >> On Apr 12, 4:26 pm, Jean Baldessar <[email protected]> wrote: >> > Hi, >> > >> > Is it possible to break a table in two Ruby objects? Ex: >> > >> > Ruby objects: >> > >> > class Pessoa >> > property :id, Serial >> > property :name, String >> > end >> > class Address >> > property :street, String >> > property :city, String >> > end >> > >> > Table: >> > >> > table Person >> > id number >> > name varchar >> > city varchar >> > street varchar >> > >> > How can i make the "connection" between them And is it possible to make >> the >> > inverse? (table Person and Address to a single Ruby object Person) >> > >> > Thks in advance, >> >> -- >> 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. >> >> > -- > 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. > -- Jean Michel Baldessar Msn: [email protected] 9976-4691 -- 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.
