-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUGAR reformats entity properties #48
Comments
The intent is to have a consistent column naming convention.. But, on second thought, not a bad idea to just use the property names as it is.. |
Any time scale for the change? |
I'd take some time to change this.. I'm considering options like making this configuration with annotations or any particular interface. That's because some apps may want to have a different column name than the property name. However, for you, you could just change the Remove the property renaming logic and you'd get the same property names as the column names. |
Satyan, I'm having a similar problem. My model is:
} And the externalId was created as "external_id" column. So, when I build a query, I have to send the prop as the name of the column instead of the name of the property. Example: Could you call the StringUtil.toSQLName when we add a property to a condition? The code would be like this: I think it will solve the problem. Thanks!! |
Hmm.. that's a nice suggestion. I'm considering Annotations for custom property names as well. Thanks, I'll look at this option too. |
The right approach is probably to beef up the query builder modules, with a specific interface for userland names that'll automatically do the name conversions under the hood. |
now we have @column annotation that enable us to use any name for a specific column |
public class Book extends SugarRecord {
String ISBN_ID;
String title_string;
}
becomes below columns
ISBNID
TITLESTRING
it shouldn't touch property names should it?
The text was updated successfully, but these errors were encountered: