[Lift] Re: camelCase to snake_case

2009-11-01 Thread aw

Thank you.  I will open an Issue for this.  I was reluctant to do it
thinking that it was a user issue.  ;-)

On Nov 1, 11:57 am, David Pollak 
wrote:
> It's not currently a feature, but please open a 
> tickethttp://github.com/dpp/liftweb/issues.  We'll get it into M8

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: camelCase to snake_case

2009-11-01 Thread David Pollak
On Sun, Nov 1, 2009 at 1:04 PM, Jeppe Nejsum Madsen wrote:

>
> Naftoli Gugenheim  writes:
>
> > Probably not too hard to do on your own via a trait: the trait should
> extend MappedField, override dbColumnName, and calculate it based on
> getClass.
>
> While this works, I think it is too tedious to do on all classes and
> fields.  I think a better approach would be to make the Connection
> naming aware and just "do the right thing" (tm) based an the specified
> naming convention
>

Acually, I'm going to do it based on a single function in MapperRules.


>
> /Jepppe
>
> >
>


-- 
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 liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: camelCase to snake_case

2009-11-01 Thread Jeppe Nejsum Madsen

Naftoli Gugenheim  writes:

> Probably not too hard to do on your own via a trait: the trait should extend 
> MappedField, override dbColumnName, and calculate it based on getClass.

While this works, I think it is too tedious to do on all classes and
fields.  I think a better approach would be to make the Connection
naming aware and just "do the right thing" (tm) based an the specified
naming convention

/Jepppe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: camelCase to snake_case

2009-11-01 Thread David Pollak
It's not currently a feature, but please open a ticket
http://github.com/dpp/liftweb/issues .  We'll get it into M8

On Sun, Nov 1, 2009 at 10:55 AM, aw  wrote:

>
> I am using Lift-Mapper with Oracle.  Oracle is a case-insensitive
> database.  For Hibernate projects, I have used the Enhanced Naming
> Convention to translate Java camelCase to a more Oracle friendly
> snake_case.  I am interested in doing the same thing with Lift Mapper/
> Record.
>
> In the mean time, I need to override dbTableName and dbColumnName, but
> I'd like to avoid that and just agree on the convention.
>
> I could imagine that the Database Provider would maintain a flag to
> say whether the database is case sensitive or not, and then based on
> that flag, would pass either the camelCase directly (for case
> sensitive), or snake_case(camelCase) (for case insensitive).
>
> (Or, does this functionality already exist and I just haven't
> configured it properly?)
> >
>


-- 
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 liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: camelCase to snake_case

2009-11-01 Thread Naftoli Gugenheim

Probably not too hard to do on your own via a trait: the trait should extend 
MappedField, override dbColumnName, and calculate it based on getClass.

-
aw wrote:


I am using Lift-Mapper with Oracle.  Oracle is a case-insensitive
database.  For Hibernate projects, I have used the Enhanced Naming
Convention to translate Java camelCase to a more Oracle friendly
snake_case.  I am interested in doing the same thing with Lift Mapper/
Record.

In the mean time, I need to override dbTableName and dbColumnName, but
I'd like to avoid that and just agree on the convention.

I could imagine that the Database Provider would maintain a flag to
say whether the database is case sensitive or not, and then based on
that flag, would pass either the camelCase directly (for case
sensitive), or snake_case(camelCase) (for case insensitive).

(Or, does this functionality already exist and I just haven't
configured it properly?)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---