Hi Torsten.

May not be the case, but I've seen do that elsewhere (in Pier I think) and
the reason is simply remove (sanitize) the namespace of the class (the
first two letters in uppercase).

Best.


2014-07-09 17:12 GMT-03:00 Torsten Bergmann <asta...@gmx.de>:

> Voyage by default provides this:
>
>   voyageCollectionName
>         "This method can be overridden with a more meaningful collection
> name"
>         ^ ((self persistentClass name first: 3) allSatisfy: #isUppercase)
>                 ifTrue: [ (self persistentClass name allButFirst: 2)
> asLegalSelector ]
>                 ifFalse: [ self persistentClass name asLegalSelector ]
>
>
> So a class name like Association will end up in a mongo collection
> like "association".
>
> But a class name with a prefix like "PDFLetter" will end up in a mongo
> collection name like "fLetter".
>
> Is there a reason for this specific default behavior and not having the
> class name (by default) as the collection name in mongo? I know I can
> override
> the method - but I wonder why it is treated specially also leading to
> potential
> conflicts:
>
>    PDFLetter voyageCollectionName  -> #fLetter
>    FLetter voyageCollectionName    -> #fLetter
>
> Thx
> T.
>
>
>

Reply via email to