Discussion:
[Middlegen-user] Bug when there is a bit column in a DB-table
Tobias Hill
2003-01-06 10:24:02 UTC
Permalink
Hi,
This is (most likely) a bug:

I am using the inet opta2000 driver to connect to MS SQL-server.
In the database I have two tables with a "bit"-column within them.
This defaults to "boolean" in the middlegen program (quite resonable).
However, the Struts source is generated like this:

----------------------------------------------------------------------

/**
* Form for company.
*
* @author <a href="<http://boss.bekk.no/boss/middlegen/>"/>Middlegen</a>
*
* @struts.form name="companyForm"
*/
public class CompanyForm extends ActionForm {

private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

private java.lang.Integer _id = null;
private java.lang.String _companyName = null;
private java.lang.String _organisationNumber = null;
private java.lang.Integer _companyCategoryId = null;
private java.lang.Integer _addressId = null;
private boolean _deleted = java.lang.Boolean.MIN_VALUE;

/**
* Standard constructor.
*/
public CompanyForm() {
}

----------------------------------------------------------------------

As you can see this will not compile. I think you will have to use
"Boolean.FALSE" or just "false" when dealing with booleans or else
the build process breaks as soon as bit:s are used and not properly
re-mapped.


Regards,
Tobias Hill
Citerus AB
Sweden
a***@netcom.no
2003-01-06 13:34:07 UTC
Permalink
I know I know.

I answered a mail on the same topic yesterday. The struts plugin is
alpha, so expect it to have bugs.

Aslak

----- Original Message -----
From: "Tobias Hill" <***@citerus.se>
Date: Monday, January 6, 2003 12:23 pm
Subject: [Middlegen-user] Bug when there is a bit column in a DB-table
Post by Tobias Hill
Hi,
I am using the inet opta2000 driver to connect to MS SQL-server.
In the database I have two tables with a "bit"-column within them.
This defaults to "boolean" in the middlegen program (quite resonable).
-------------------------------------------------------------------
---
/**
* Form for company.
*
target="l">http://boss.bekk.no/boss/middlegen/>"/>Middlegen*
*/
public class CompanyForm extends ActionForm {
private final static SimpleDateFormat FORMAT = new
SimpleDateFormat("dd.MM.yyyy hh:mm:ss");
private java.lang.Integer _id = null;
private java.lang.String _companyName = null;
private java.lang.String _organisationNumber = null;
private java.lang.Integer _companyCategoryId = null;
private java.lang.Integer _addressId = null;
private boolean _deleted = java.lang.Boolean.MIN_VALUE;
/**
* Standard constructor.
*/
public CompanyForm() {
}
-------------------------------------------------------------------
---
As you can see this will not compile. I think you will have to use
"Boolean.FALSE" or just "false" when dealing with booleans or else
the build process breaks as soon as bit:s are used and not properly
re-mapped.
Regards,
Tobias Hill
Citerus AB
Sweden
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...