On Thu, Jan 28, 2010 at 3:09 AM, Jeppe Nejsum Madsen <je...@ingolfs.dk>wrote:
> David Pollak <feeder.of.the.be...@gmail.com> writes: > > >> 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. > > I agree > > > How about having two different classes that different just a little in > > terms of name? > > Yes but due to the inability (i think?) to really create reusable Mapper > models, you would have to copy both the model classes and the test cases > which I think is not optimal for a maintenance pov. > > I tried wrapping all the models in a class, but then createInstance fails > since there's now no anonymous constructor..... > > But I'll do the copy thing for know.... > > > BTW... Do you know about Helpers.capify? It might be nice to add snakify > > that'll turn CamelCase into snake_case. > > Didn't know that, but there's ClassHelpers.unCamelCase that does snakify > :-) I would think StringHelpers would be a more appropriate place for > this (as well as camelCase)? > Yes... I think StringHelpers would be a better place. > > /Jeppe > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > 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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.