Hi Cies,

The EmbeddedValue equivalent hasn't made it's way back into dm-core
yet, although I've had plans for some time to add it back in. The
documentation you've found is likely just a hold-over from the DM 0.3
code.

For people who've never heard of Embedded Value, it's from Martin
Fowler's book Patterns of Enterprise Application Architecture (PoEAA),
which is actually where DataMapper, Repository, IdentityMap and even
ActiveRecord were first identified and named.  The idea is that you
map one or more fields in a table to a single object, and interact
with the object instead of the underlying fields.  It's like our Types
system, but on steroids. :)

I could explain in detail what I've been planning, or just demonstrate
it in an example:

http://gist.github.com/29933

The idea is that the Embedded Value will be designed to look and work
like a Model.  You can add class or instance methods to it, and to all
intents and purposes it will work just like a Model, and it's
instances will work like a Resource.  However, it will persist the
values inside the Resource rather than in a separate table.

There's still alot of work that needs to be done before we can have
this though.  The DM specs and docs need to be finished, so that the
Property and Types system can be restructured and simplified.  Once
that's done it will be much easier to add Embedded Value as a plugin,
building on parts of the new Property and Types system.

Dan
(dkubb)

On Nov 27, 10:59 pm, cies <[EMAIL PROTECTED]> wrote:
> hi guys..
>
> question: i cant get "embed" to work.
> is it still possible to group a bunch of properties together with
> 'embed' or did that behaviour change?
>
> http://datamapper.rubyforge.org/DataMapper/Property.html
> here it talks about embedded properties
> but it doesnt seem to work (anymore) with the embed method
>
> when i do 
> this:http://datamapper.rubyforge.org/classes/DataMapper/Persistence/ClassM...
>
> it tells me:
> Unknown property 'embed' (ArgumentError)
>
> i have the feeling it got moved out of dm-core yet still lives on in
> the documentation
>
> usr/lib64/ruby/gems/1.8/gems# grep -ri embed dm*    # gives me only:
> dm-core-0.9.6/lib/dm-core/property.rb:  # == Embedded Values
> dm-core-0.9.6/lib/dm-core/property.rb:  # EmbeddedValue.
> dm-core-0.9.6/History.txt:* Added EmbeddedValue support, and
> accompanying spec
>
> only docs, but no implementation at all.
>
> anyone knows a bit more about this misterious "embed" thingy?
>
> thanks!
> cies breijs.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to