> Nobody wants to consume yaml. :)

Oh, cool.  That makes my life easier.

> This is often an antipattern, at least if you ever need to query on
> multiple keys/values (e.g. find all books that have bar and foo and
> not baz in their glossary).

Can you recommend reading for the correct pattern?  Basically, a
pattern for implementing the fastest, most normalized method for
associating arbitrary name-value pairs to a table representing a
domain model distinct from the name-value pairs?

> Well, if you are using the Sequel plugins, they are specially designed
> for Sequel objects.  With to_yaml, you are getting a generic method.
> Like I mentioned earlier, you can get something similar with yaml, but
> it will require a similar approach as the existing Sequel plugins.

Oh, that makes sense.  I had assumed that Sequel provided YAML
serialization support built-in.

> > Postgres) complains about duplicate primary keys:
> > ERROR: duplicate key value violates unique constraint "chapter_pkey"
>
> I don't follow this.  deserialization should happen on retrieval,
> serialization happens before the SQL query is submitted.  If you could
> provide the code, backtrace, and SQL log, I can attempt to diagnose
> the issue.

I think I'm just having difficulty explaining what I am trying to do.
That probably just means I'm not clear about what I am trying to do
myself.  :-)

> By default, Sequel doesn't select columns from the join table in a
> many_to_many association, but you can set the :select association
> option to do so.

I'll keep that in mind when I try to modify my current arrangement.

> it's better to pastie code and backtraces if you
> run into problems, as that makes it easier to diagnose what the
> problem is.

Thanks again, Jeremy.  In the future, I'll try to come up with real-
world examples of my issues.

However, the application that I am developing is not only under an
NDA, but it is written in JRuby, so any problems I encounter are often
very specific to the platform and the business requirements of the
implementation.  Generalizing the code to make it shareable in the
forum is tricky, and sometimes simply not possible.

I attempted to make things as general as possible with the "Book"
scenario, but I think I had trouble translating the issues.
-Nels

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en.

Reply via email to