Giter Club home page Giter Club logo

jpagen's People

Contributors

marcuspocus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jpagen's Issues

db.default.schema (optional, default="")

Hello,

I'm trying to use jpagen for one of my small projects but every time I got the same error:

11:32:31,063 INFO ~ MLog clients using log4j logging.
11:32:31,339 INFO ~ templateFile: list.tmpl
11:32:32,710 ERROR ~ null
java.lang.NullPointerException
at play.modules.jpagen.ListGenerator.main(ListGenerator.java:64)

I read the documentation again and again and seems everything was right, all the required properties are there. So I went to debugging to find out. While debugging I realize that the error was because I haven't set a value for the "db.default.schema" property. When I did everything worked just fine. I think you can solve this issue by two ways; updating the documentation and define "db.default.schema" as required or change the code to really accept it as empty property:

I also did the second one, my one cent contribution is below:
I commented the following lines:

>46:  //if (temp.length() > 1) {
47:     schemas = temp.split(",");
>48:  //}

and also including this:

>72:  if(schema.length()>0)
73:        table = schema + "." + rs.getString("TABLE_NAME").trim();
>74:  else
>75:     table = rs.getString("TABLE_NAME").trim();

With this little and dirt mod the "db.default.schema" property can be empty.

Another changing I made was in the Generator. My tables are all capitalized like BASE_SOFTWARE then the generated class was capitalized too, like BASESOFTWARE. So I changed the following line:

182:    column.columnPropertyName = JavaExtensions.camelCase(column.columnName.replaceAll("_", " "));

by this one:

182:    column.columnPropertyName = JavaExtensions.camelCase(column.columnName.toLowerCase().replaceAll("_", " "));

And then the generated class was named BaseSoftware.

Forgive me if I was not clear, English is not my primary language.

Thank you for this module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.