Share

SQL to Java Code Generator

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Savinf unmodified bean

You are viewing a single message from this topic. View all messages.

  1. 2005-09-10 21:11:51 UTC

    Hi,
    Sorry for the inconvenience. We decided to implement it after receiving several complaints about trying to save bean without any fields set leading to some errors.

    But you're right... we neglect to inform you properly.

    Here is a way to rollback this behavior:
    since sql2java is now template based you can configure the desired behavior by hacking on of our template.
    In your case, take a look at http://sql2java.sourceforge.net/copied/xManagerTemplate.vm
    And simply comment out the following lines in the save method:

    if (!pObject.isModified()) {
    return pObject; // should not we log something ?
    }

    N.
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.