Skip to content

Conversation

smith153
Copy link

Wasted 30 minutes trying to join to a table name instead of relationship (even though I was franticly digging through the docs)

Wasted 30 minutes trying to join to a table name instead of relationship (even though I was franticly digging through the docs)
@ribasushi
Copy link
Collaborator

Thank you for the contribution! I am afraid that the bolding alone will not really work, as it would imply that this is an exception, not a rule. In reality there is only one single spot within the DBIx::Class API where you are going to use the actual source name - the call to ->table() itself, at metadata declaration time.

Nowhere else will you be able to use the original table name, as any source is aliased either to me or to relationship name.

Also would it be possible to do a general grep on the documentation and expand this to other spots?

@smith153
Copy link
Author

I think I could revise to include some other docs, yes. The issue is for some of us, we know and have used DBIx::Class many times, it is just sometimes months go by in between usage and as a quick refresher (at least for me), the cookbook examples are used since they are more advanced. And this can lead to missing out on some concepts that might have been coved better elsewhere in the docs.

@ribasushi
Copy link
Collaborator

On 07/15/2015 08:34 PM, Samuel Smith wrote:

I think I could revise to include some other docs, yes. The issue is
for some of us, we know and have used DBIx::Class many times, it is
just sometimes months go by in between usage and as a quick refresher
(at least for me), the cookbook examples are used since they are more
advanced. And this can lead to missing out on some concepts that might
have been coved better elsewhere in the docs.

Right. I don't mind the actual fix. I am worried about the inconsistent
"here and there" patchups, that lead to even further fragmentation of
the documentation. To a point where it becomes a completely different
thing depending on your entry point as a reader. So I really wish you
could do a little more digging, and come up with a more substantial
"here are the spots where we need to mention the concept, and maybe even
link back to a longer explanation that possibly resides right at the
->table() method POD"

Thanks in advance!

@smith153
Copy link
Author

I just read through most of the docs. At least in DBIx::Class::Manual::Joining, it is clear that table names are not used. Looking at other 'cookbook' style docs in cpan shows they are normally more of a hodgepodge of examples and documentation. In this case I think a little bolding of certain words and concepts are warranted and doesn't lead to fragmentation. Your call on a merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants