CREATE TABLE home_resource (
	home_resource_id int NOT NULL ,
	user_id int NOT NULL,
	CONSTRAINT PK_home_resource_id PRIMARY KEY
	(
		home_resource_id
	),
	CONSTRAINT FK_home_resource_to_resources FOREIGN KEY
	(
		home_resource_id
	) REFERENCES resources (
		resource_id
	)
)
GO


INSERT INTO classes (type, super_type, db_name, table_name, java_class)
	VALUES(111, 10, 'building2', 'home_resource', 'org.bodington.server.resources.HomeResource')
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(111, 1, 'home_resource_id', 'setHomeResourceId', 'getHomeResourceId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 1, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(111, 2, 'user_id', 'setUserId', 'getUserId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 0, null, null, null )
GO




