db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Schlining <br...@mbari.org>
Subject [JDO] bit/boolean in apache derby
Date Mon, 07 Nov 2005 22:17:14 GMT
Hi All,

I'm porting an application from SQL Server to Apache Derby. The  
application uses a table that contains a bit column to store a  
boolean type value (0 = false, 1 = true). I've looked through the  
Derby documentation available at http://db.apache.org/derby/docs/10.1/ 
ref/ and there's not a bit data type in Derby. Any recommendations on  
what I should be using in Derby to map bit values?

A little more background:
	My application uses an O/R mapping layer (Castor, http:// 
www.castor.org) and is meant to be portable across databases, (i.e it  
should run on SQL Server, Derby and others without having to modify  
code or mapping files.). The application is also being used in a  
production environment so changing the bit field on SQL server to  
something else isn't really a good option for me. The offending  
tables T-SQL is:

CREATE TABLE [dbo].[Media] (
     [id] bigint NOT NULL,
     [ConceptDelegateID_FK] bigint NULL,
     [MediaFileName] varchar(1024) NULL,
     [MediaType] char(5) NULL,
     [PrimaryMedia] bit NULL DEFAULT (0),
     [Credit] varchar(255) NULL,
     [Caption] varchar(1000) NULL,
     CONSTRAINT [PK_Media] PRIMARY KEY([id])
)
GO

BTW, the application in question can be found at http:// 
vars.sourceforge.net

Cheers
B
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
MBARI
Software Engineer
brian@mbari.org
(831)775-1855
http://www.mbari.org/staff/brian


Mime
View raw message