Use of the "original" text tool--quickly generate the Model class attribute for the table based on the database field

Source: Internet
Author: User

In the actual project development process, we often encounter such a problem: the database table fields are named by the underscore method is designed, next is to create the table corresponding to the model class. If we follow the fields in the database table and then manually hit them again, the properties of the corresponding model class are generated. There seems to be nothing to manually create the model class in the case of fewer fields. If the field is more, it's a little time-consuming. So how do you quickly generate a model class for a database table field? Here are my solutions:

1. Copy the build statement to a text editor, such as Notepad++,editplus,vim.

2. Culling other strings, extracting fields

Click Replace All

3. Underline method of turning hump method

Click Replace All

4. Finally, depending on the actual situation, modify the type of the property and generate its Getter/setter method.

Use of the "original" text tool--quickly generate the Model class attribute for the table based on the database field

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.