Menu

Support for database schema 'default's

crispyduck
2004-12-30
2013-04-25
  • crispyduck

    crispyduck - 2004-12-30

    Firstly some independant feedback ... I've just downloaded Sql2Java 2.5 and started working with it.  The download worked first time with your example that I hooked up to MySQL within minutes.

    Now turning this to replace my existing web database engine I though of an enhancement:

    Current situation:
    -----------------
    When creating a new item in a database table, using create*Bean(), I have noticed that you need to initialise ALL table fields.  In my case this could be up to 30 items.

    Desirable Idea:
    --------------
    Ideally, when creating a new item in a database table using create*Bean(), it would be good if I only had to set the fields I actually wanted changed from the default.  Sql2Java could perhaps determine the default values (if) specified in the database schema.  In my case the schema includes 'default' vaules for ALL fields.

    Other considerations could be to overload the create*Bean() method to accept one (e.g. null) or more (variable args) which could be used to initialise new table row items.

    Thanks for listening and for a great piece of OpenSource software.  Keep up the good work and keep improving it - there are a few good suggestions already I see.

    Best regards,
    -Steve.

     
    • nr

      nr - 2005-01-09

        Hi,

      Thanks for the feedback. You do not have to initialize all fields to create the item.

      However you are right we do not provide default values. This is something we had in the past and plan to re-introduce, but we really lack of time and are extremelly busy with our daylight job. I put it first on my list though.
      Thanks,

      N.

       
      • crispyduck

        crispyduck - 2005-01-10

        Thanks for your reply.  Sorry, I think I assumed the wrong thing when I saw the debug (in the example) saying not initialised.

        Fully understand your priorities.  No rush, now I know you do not have to initialize all fields.

        Regards,
        -Steve.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.