On Wed, Jan 27, 2010 at 5:53 AM, Jeppe Nejsum Madsen <[email protected]>wrote:

>
>
> On Jan 26, 8:04 pm, Jeppe Nejsum Madsen <[email protected]> wrote:
>
> I'v implemented this:
>
> > In MapperRules add
> >   var columnName: String => String = s => s.toLowerCase
> >
> > (and perhaps tableName, indexName etc. if we want full flexibility)
> >
> > - name: object name unchanged (ie not lower cased)
> > - dbColumnName: default is MapperRules.columnName(name) unless this is
> >   reserved, in which case "_c" is appended.
> > - _dbColumnNameLC: No change
>
> but I'm running into a problem with the test cases. Since the names of
> the Mapped objects are fixed once determined, it's hard to reuse the
> different models in MapperSpecs for the different naming conventions.
>
> I was thinking about adding some kind of "reset" method to metamapper,
> but I always hate when code is added just for testing....
>
> Any hints how to solve this?
>

For performance and stability reasons, I'd strongly recommend making those
values set-once.  How about having two different classes that different just
a little in terms of name?

BTW... Do you know about Helpers.capify?  It might be nice to add snakify
that'll turn CamelCase into snake_case.


>
> /Jeppe
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<liftweb%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

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

Reply via email to