Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Duplicate field name on SQLServer Identity primary Key fields
Patrick Lynch
#1 Posted : Monday, September 10, 2018 6:03:56 AM(UTC)


Connected to MSSQL database (2012) and generated model. All tables with identity Key seem to have duplicate field names defined in the Fieldset. Reason/help?

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://www.xomega.net/omodel" xmlns:xfk="http://www.xomega.net/framework"
xmlns:wcf="http://www.xomega.net/wcf"
xmlns:rest="http://www.xomega.net/rest"
xmlns:ui="http://www.xomega.net/ui"
xmlns:asp="clr-namespace:System.Web.UI.WebControls;assembly=System.Web"
xmlns:sql="http://www.xomega.net/sql"
xmlns:clr="http://www.xomega.net/clr"
xmlns:edm="http://www.xomega.net/edm">
<fieldsets>
<fieldset name="bom assem">
<field name="bom assem id" type="integer" required="true">
<config>
<sql:column name="BomAssemID" serial="true"/>
</config>
</field>
<field name="bom assem id" type="integer" required="true">
<config>
<sql:column name="BomAssemID" serial="true"/>
</config>
</field>
<field name="last updated date" type="date time" required="true">
<config>
<sql:column name="LastUpdatedDate" default="(getdate())"/>
</config>
</field>
</fieldset>
</fieldsets>
<objects>
<object name="bom assem">
xomega
#2 Posted : Monday, September 10, 2018 6:31:07 AM(UTC)
xomega



Hi Patrick,

Thanks for reporting this issue. This is really weird. The field sets should be created during the import only for composite primary or foreign keys, but not for identity keys.

Did it use the generated "bom assem" fieldset as the key for the "bom assem" object? Would you be able to share the DDL for any table that demonstrates this issue, so that we could reproduce it locally?

Thanks in advance,
Xomega Team
Patrick Lynch
#3 Posted : Tuesday, September 11, 2018 9:00:58 AM(UTC)


OK so I was incorrect about all tables. It turns out only three are like this. It just happened that the first two I looked at had this problem. I am going to give you the ddl for the most simple table, BizOrgAddress which has the problem: Duplicate fields in Fieldset and including the LastUpdatedDate as well. In your previous post you mention the Fieldset should only exist for composite keys or foreign keys. In this table field "biz Org id" IS a foreign key to the parent table BizOrg. But it's not in this fieldset???

Also it appears that the generator is taking ProperCased table columns and changing them to lower case with a space for each Uppercased letter. Is there a setting to remove the spaces so that LastUpdatedDate -> lastupdateddate or lastUpdatedDate? I don't think I can handle the spaces......

Your generated code:
biz_org_address.xom

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://www.xomega.net/omodel" xmlns:xfk="http://www.xomega.net/framework"
xmlns:wcf="http://www.xomega.net/wcf"
xmlns:rest="http://www.xomega.net/rest"
xmlns:ui="http://www.xomega.net/ui"
xmlns:asp="clr-namespace:System.Web.UI.WebControls;assembly=System.Web"
xmlns:sql="http://www.xomega.net/sql"
xmlns:clr="http://www.xomega.net/clr"
xmlns:edm="http://www.xomega.net/edm">
<fieldsets>
<fieldset name="biz org address">
<field name="biz org address id" type="integer" required="true">
<config>
<sql:column name="BizOrgAddressID" serial="true"/>
</config>
</field>
<field name="biz org address id" type="integer" required="true">
<config>
<sql:column name="BizOrgAddressID" serial="true"/>
</config>
</field>
<field name="last updated date" type="date time" required="true">
<config>
<sql:column name="LastUpdatedDate" default="(getdate())"/>
</config>
</field>
</fieldset>
</fieldsets>
<objects>
<object name="biz org address">
<fields>
<fieldset ref="biz org address" key="supplied" required="true"/>
<field name="biz org id" type="biz org" required="true">
<config>
<sql:column name="BizOrgID"/>
</config>
</field>
<field name="biz org address type id" type="biz org address type" required="true">
<config>
<sql:column name="BizOrgAddressTypeID"/>
</config>
</field>
<field name="street1" type="char string75" required="true">
<config>
<sql:column name="Street1"/>
</config>
</field>
<field name="street2" type="char string75">
<config>
<sql:column name="Street2"/>
</config>
</field>
<field name="city" type="char string50" required="true">
<config>
<sql:column name="City"/>
</config>
</field>
<field name="state region" type="char string20">
<config>
<sql:column name="StateRegion"/>
</config>
</field>
<field name="postal code" type="char string20">
<config>
<sql:column name="PostalCode"/>
</config>
</field>
<field name="country" type="char string50">
<config>
<sql:column name="Country"/>
</config>
</field>
<field name="last updated by" type="char string50" required="true">
<config>
<sql:column name="LastUpdatedBy" default="(suser_sname())"/>
</config>
</field>
<field name="is deleted" type="boolean" required="true">
<config>
<sql:column name="IsDeleted" default="((0))"/>
</config>
</field>
<field name="default attention" type="char string50">
<config>
<sql:column name="DefaultAttention"/>
</config>
</field>
<field name="default phone" type="char string25">
<config>
<sql:column name="DefaultPhone"/>
</config>
</field>
<field name="default fax" type="char string25">
<config>
<sql:column name="DefaultFax"/>
</config>
</field>
</fields>
<config>
<sql:table name="BizOrgAddress"/>
</config>
</object>
</objects>
</module>

Here is the generated DDL (note you may only need the table and primary key?):


IF EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[tg_BizOrgAddress_d]'))
DROP TRIGGER [dbo].[tg_BizOrgAddress_d]
GO

IF EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[tg_BizOrgAddress_i]'))
DROP TRIGGER [dbo].[tg_BizOrgAddress_i]
GO

IF EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[tg_BizOrgAddress_u]'))
DROP TRIGGER [dbo].[tg_BizOrgAddress_u]
GO

IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_BizOrgAddress_BizOrgAddressType]') AND parent_object_id = OBJECT_ID(N'[dbo].[BizOrgAddress]'))
ALTER TABLE [dbo].[BizOrgAddress] DROP CONSTRAINT [FK_BizOrgAddress_BizOrgAddressType]
GO

IF EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_BizOrgAddress_BizOrg]') AND parent_object_id = OBJECT_ID(N'[dbo].[BizOrgAddress]'))
ALTER TABLE [dbo].[BizOrgAddress] DROP CONSTRAINT [FK_BizOrgAddress_BizOrg]
GO

IF EXISTS (SELECT 0 FROM sys.objects o WHERE o.[name]='DF__BizOrgAdd__IsDel__24DE2179' AND o.[type] IN ('D','C'))
ALTER TABLE [dbo].[BizOrgAddress] DROP CONSTRAINT [DF__BizOrgAdd__IsDel__24DE2179]
GO
IF EXISTS (SELECT 0 FROM sys.objects o WHERE o.[name]='DF__BizOrgAdd__LastU__22F5D907' AND o.[type] IN ('D','C'))
ALTER TABLE [dbo].[BizOrgAddress] DROP CONSTRAINT [DF__BizOrgAdd__LastU__22F5D907]
GO
IF EXISTS (SELECT 0 FROM sys.objects o WHERE o.[name]='DF__BizOrgAdd__LastU__23E9FD40' AND o.[type] IN ('D','C'))
ALTER TABLE [dbo].[BizOrgAddress] DROP CONSTRAINT [DF__BizOrgAdd__LastU__23E9FD40]
GO
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[BizOrgAddress]') AND name = N'PK_BizOrgAddress')
ALTER TABLE [dbo].[BizOrgAddress] DROP CONSTRAINT [PK_BizOrgAddress] WITH ( ONLINE = OFF )
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[BizOrgAddress]') AND type in (N'U'))
DROP TABLE [dbo].[BizOrgAddress]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[BizOrgAddress](
[BizOrgAddressID] [int] IDENTITY(1,1) NOT NULL,
[BizOrgID] [int] NOT NULL,
[BizOrgAddressTypeID] [int] NOT NULL,
[Street1] [varchar](75) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Street2] [varchar](75) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[City] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[StateRegion] [varchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PostalCode] [varchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Country] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastUpdatedBy] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[LastUpdatedDate] [datetime] NOT NULL,
[IsDeleted] [bit] NOT NULL,
[DefaultAttention] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DefaultPhone] [varchar](25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DefaultFax] [varchar](25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]

GO

/****** Object: Index [PK_BizOrgAddress] Script Date: 9/11/2018 11:49:39 AM ******/
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[BizOrgAddress]') AND name = N'PK_BizOrgAddress')
ALTER TABLE [dbo].[BizOrgAddress] ADD CONSTRAINT [PK_BizOrgAddress] PRIMARY KEY CLUSTERED
(
[BizOrgAddressID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO



IF (SELECT COUNT(*) FROM sys.objects o JOIN sys.columns c ON o.[object_id]=c.[object_id] WHERE o.[object_id]=OBJECT_ID(N'[dbo].[BizOrgAddress]') AND c.[name] IN ('BizOrgAddressTypeID'))>=1 AND OBJECT_ID('[dbo].[FK_BizOrgAddress_BizOrgAddressType]') IS NULL
ALTER TABLE [dbo].[BizOrgAddress] WITH CHECK ADD CONSTRAINT [FK_BizOrgAddress_BizOrgAddressType] FOREIGN KEY([BizOrgAddressTypeID])
REFERENCES [dbo].[BizOrgAddressType] ([BizOrgAddressTypeID])
GO

IF EXISTS (SELECT 0 FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_BizOrgAddress_BizOrgAddressType]'))
ALTER TABLE [dbo].[BizOrgAddress] CHECK CONSTRAINT [FK_BizOrgAddress_BizOrgAddressType]
GO



IF (SELECT COUNT(*) FROM sys.objects o JOIN sys.columns c ON o.[object_id]=c.[object_id] WHERE o.[object_id]=OBJECT_ID(N'[dbo].[BizOrgAddress]') AND c.[name] IN ('BizOrgID'))>=1 AND OBJECT_ID('[dbo].[FK_BizOrgAddress_BizOrg]') IS NULL
ALTER TABLE [dbo].[BizOrgAddress] WITH CHECK ADD CONSTRAINT [FK_BizOrgAddress_BizOrg] FOREIGN KEY([BizOrgID])
REFERENCES [dbo].[BizOrg] ([BizOrgID])
GO

IF EXISTS (SELECT 0 FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_BizOrgAddress_BizOrg]'))
ALTER TABLE [dbo].[BizOrgAddress] CHECK CONSTRAINT [FK_BizOrgAddress_BizOrg]
GO



IF NOT EXISTS (select 0 from sys.columns c join sys.objects o on c.default_object_id=o.[object_id] join sys.objects p on o.parent_object_id=p.[object_id] where p.[object_id]=object_id('[dbo].[BizOrgAddress]') and c.[name]='IsDeleted') AND EXISTS (select 0 FROM sys.columns c JOIN sys.objects o ON c.[object_id]=o.[object_id] AND c.[name]='IsDeleted' AND o.[object_id]=object_id('[dbo].[BizOrgAddress]'))
ALTER TABLE [dbo].[BizOrgAddress] ADD CONSTRAINT [DF__BizOrgAdd__IsDel__24DE2179] DEFAULT ((0)) FOR [IsDeleted]
GO

IF NOT EXISTS (select 0 from sys.columns c join sys.objects o on c.default_object_id=o.[object_id] join sys.objects p on o.parent_object_id=p.[object_id] where p.[object_id]=object_id('[dbo].[BizOrgAddress]') and c.[name]='LastUpdatedBy') AND EXISTS (select 0 FROM sys.columns c JOIN sys.objects o ON c.[object_id]=o.[object_id] AND c.[name]='LastUpdatedBy' AND o.[object_id]=object_id('[dbo].[BizOrgAddress]'))
ALTER TABLE [dbo].[BizOrgAddress] ADD CONSTRAINT [DF__BizOrgAdd__LastU__22F5D907] DEFAULT (suser_sname()) FOR [LastUpdatedBy]
GO

IF NOT EXISTS (select 0 from sys.columns c join sys.objects o on c.default_object_id=o.[object_id] join sys.objects p on o.parent_object_id=p.[object_id] where p.[object_id]=object_id('[dbo].[BizOrgAddress]') and c.[name]='LastUpdatedDate') AND EXISTS (select 0 FROM sys.columns c JOIN sys.objects o ON c.[object_id]=o.[object_id] AND c.[name]='LastUpdatedDate' AND o.[object_id]=object_id('[dbo].[BizOrgAddress]'))
ALTER TABLE [dbo].[BizOrgAddress] ADD CONSTRAINT [DF__BizOrgAdd__LastU__23E9FD40] DEFAULT (getdate()) FOR [LastUpdatedDate]
GO
/****** Object: Trigger [dbo].[tg_BizOrgAddress_d] Script Date: 9/11/2018 11:49:39 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER tg_BizOrgAddress_d ON [dbo].[BizOrgAddress]
INSTEAD OF DELETE
AS
BEGIN
/*
<UDP><Name>SystemGenerated</Name><Value>True</Value></UDP>
*/
-- Only allow delete if was against a row that had deleted flag set previously
DELETE [dbo].[BizOrgAddress]
FROM deleted d
WHERE
d.BizOrgAddressID = dbo.BizOrgAddress.BizOrgAddressID
AND d.IsDeleted = 1

IF @@ROWCOUNT = 0
RAISERROR ('You cannot perform a physical delete on BizOrgAddress.', 16, 1)
END
GO

ALTER TABLE [dbo].[BizOrgAddress] ENABLE TRIGGER [tg_BizOrgAddress_d]
GO

/****** Object: Trigger [dbo].[tg_BizOrgAddress_i] Script Date: 9/11/2018 11:49:39 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER tg_BizOrgAddress_i ON [dbo].[BizOrgAddress]
FOR INSERT
AS
BEGIN
/*
<UDP><Name>SystemGenerated</Name><Value>True</Value></UDP>
*/

INSERT [Herrick.MaterialControl].[History].[BizOrgAddress] (
BizOrgAddressID
, BizOrgID
, BizOrgAddressTypeID
, Street1
, Street2
, City
, StateRegion
, PostalCode
, Country
, DefaultAttention
, DefaultPhone
, DefaultFax
, LastUpdatedBy
, LastUpdatedDate , IsDeleted )
SELECT
BizOrgAddressID
, BizOrgID
, BizOrgAddressTypeID
, Street1
, Street2
, City
, StateRegion
, PostalCode
, Country
, DefaultAttention
, DefaultPhone
, DefaultFax
, LastUpdatedBy
, LastUpdatedDate , IsDeleted
FROM
inserted i
END
GO

ALTER TABLE [dbo].[BizOrgAddress] ENABLE TRIGGER [tg_BizOrgAddress_i]
GO

/****** Object: Trigger [dbo].[tg_BizOrgAddress_u] Script Date: 9/11/2018 11:49:39 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO




CREATE TRIGGER tg_BizOrgAddress_u ON [dbo].[BizOrgAddress]
FOR UPDATE
AS
BEGIN
/*
<UDP><Name>SystemGenerated</Name><Value>True</Value></UDP>
*/

DECLARE @__tc int
SET @__tc = @@TRANCOUNT
DECLARE @__e int
SET @__e = 0


DECLARE @lud datetime
SELECT @lud = GETDATE()

-- When base table does not have last updated date updated, do so now
UPDATE t
SET LastUpdatedDate = @lud
FROM inserted i INNER LOOP JOIN deleted d ON
i.BizOrgAddressID = d.BizOrgAddressID
AND i.LastUpdatedDate = d.LastUpdatedDate
INNER LOOP JOIN [dbo].[BizOrgAddress] t ON
i.BizOrgAddressID = t.BizOrgAddressID

-- Always go out and expire history's current
UPDATE h
SET RowExpiryDate = (CASE WHEN i.LastUpdatedDate = d.LastUpdatedDate THEN @lud ELSE i.LastUpdatedDate END)
FROM inserted i
JOIN [Herrick.MaterialControl].[History].[BizOrgAddress] h ON
i.BizOrgAddressID = h.BizOrgAddressID
AND h.LastUpdatedDate =
(SELECT TOP 1 h2.LastUpdatedDate
FROM [Herrick.MaterialControl].[History].[BizOrgAddress] h2
WHERE h2.BizOrgAddressID = i.BizOrgAddressID)
JOIN deleted d ON
i.BizOrgAddressID = d.BizOrgAddressID

IF @@ERROR <> 0 SET @__e = 1

-- Always go out and insert new into history as current
INSERT [Herrick.MaterialControl].[History].[BizOrgAddress] (
BizOrgAddressID
, BizOrgID
, BizOrgAddressTypeID
, Street1
, Street2
, City
, StateRegion
, PostalCode
, Country
, DefaultAttention
, DefaultPhone
, DefaultFax
, LastUpdatedBy
, LastUpdatedDate , IsDeleted )
SELECT
i.BizOrgAddressID
, i.BizOrgID
, i.BizOrgAddressTypeID
, i.Street1
, i.Street2
, i.City
, i.StateRegion
, i.PostalCode
, i.Country
, i.DefaultAttention
, i.DefaultPhone
, i.DefaultFax
, i.LastUpdatedBy
, (CASE WHEN i.LastUpdatedDate = d.LastUpdatedDate THEN @lud ELSE i.LastUpdatedDate END) , i.IsDeleted
FROM
inserted i INNER LOOP JOIN deleted d ON
i.BizOrgAddressID = d.BizOrgAddressID

IF @@ERROR <> 0 SET @__e = 1

-- Physical delete of current if set the delete flag
DELETE [dbo].[BizOrgAddress]
FROM inserted i
WHERE
i.BizOrgAddressID = dbo.BizOrgAddress.BizOrgAddressID
AND i.IsDeleted = 1

IF @@ERROR <> 0 SET @__e = 1

ErrorHandler:
IF @__e <> 0 AND @__tc > 0 ROLLBACK TRAN
END



GO

ALTER TABLE [dbo].[BizOrgAddress] ENABLE TRIGGER [tg_BizOrgAddress_u]
GO
xomega
#4 Posted : Tuesday, September 11, 2018 7:22:26 PM(UTC)
xomega



Thanks again for posting the DDL. I tried creating the table in SQL Server 2016 and importing it into a Xomega model, and the import was correct with no fieldsets defined, and just a special type for the key field (see below).

Quote:
In your previous post you mention the Fieldset should only exist for composite keys or foreign keys. In this table field "biz Org id" IS a foreign key to the parent table BizOrg. But it's not in this fieldset???

What I meant to say is that fieldsets are created for composite primary keys and composite foreign keys (that consist of more than one field). The "biz org id" field uses a special logical type "biz org" in the Xomega model, which is reserved for the key field of the "biz org" object. This establishes an implicit relationship to the BizOrg table. The same is for the "biz org address type id" field.

If BizOrgAddress object is logically a part of the BizOrg domain object, then it would make more sense to move it as a sub-object of the "biz org" object, and drop the "biz org" field from it, since it would be implicitly included in the Xomega model. The DB Import generator would've imported it like this, if that foreign key had a cascade delete on it (which is not possible because of the INSTEAD OF DELETE trigger on it). But it is still pretty easy to move it manually in XML, if you would like to better design your domain model using Xomega.

Quote:
Also it appears that the generator is taking ProperCased table columns and changing them to lower case with a space for each Uppercased letter. Is there a setting to remove the spaces so that LastUpdatedDate -> lastupdateddate or lastUpdatedDate? I don't think I can handle the spaces......

The DB Import keeps the original SQL names for the DB columns (e.g. <sql:column name="BizOrgAddressID"/>), but uses Xomega natural convention of lower case space-delimited strings for the logical field names. When the code is generated from this model, the C# (and other) field names will be properly capitalized with no spaces, but this convention still allows to retain the boundaries of each word in the field name, which is important to be able to properly generate readable labels on the screens, for example. Otherwise, the labels on the screens would have no spaces, and you would have to fix them for a lot of fields. That being said though, it won't be hard to add a parameter to the DB Import generator, where you'd be able to specify a different naming convention, such as with underscores, or even no separators.

Would it be okay for you if we troubleshoot this issue with the import further via an email? I will then send you some things to try, since I would really like to get to the bottom of it.

Here is the (proper) XML for the Xomega model that I got for your BizOrgAddress table.

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://www.xomega.net/omodel" xmlns:xfk="http://www.xomega.net/framework"
xmlns:wcf="http://www.xomega.net/wcf"
xmlns:rest="http://www.xomega.net/rest"
xmlns:ui="http://www.xomega.net/ui"
xmlns:asp="clr-namespace:System.Web.UI.WebControls;assembly=System.Web"
xmlns:sql="http://www.xomega.net/sql"
xmlns:clr="http://www.xomega.net/clr"
xmlns:edm="http://www.xomega.net/edm">
<types>
<type name="biz org address" base="integer key"/>
</types>
<objects>
<object name="biz org address">
<fields>
<field name="biz org address id" type="biz org address" key="serial" required="true">
<config>
<sql:column name="BizOrgAddressID"/>
</config>
</field>
<field name="biz org id" type="biz org" required="true">
<config>
<sql:column name="BizOrgID"/>
</config>
</field>
<field name="biz org address type id" type="biz org address type" required="true">
<config>
<sql:column name="BizOrgAddressTypeID"/>
</config>
</field>
<field name="street1" type="char string75" required="true">
<config>
<sql:column name="Street1"/>
</config>
</field>
<field name="street2" type="char string75">
<config>
<sql:column name="Street2"/>
</config>
</field>
<field name="city" type="char string50" required="true">
<config>
<sql:column name="City"/>
</config>
</field>
<field name="state region" type="char string20">
<config>
<sql:column name="StateRegion"/>
</config>
</field>
<field name="postal code" type="char string20">
<config>
<sql:column name="PostalCode"/>
</config>
</field>
<field name="country" type="char string50">
<config>
<sql:column name="Country"/>
</config>
</field>
<field name="last updated by" type="char string50" required="true">
<config>
<sql:column name="LastUpdatedBy" default="(suser_sname())"/>
</config>
</field>
<field name="last updated date" type="date time" required="true">
<config>
<sql:column name="LastUpdatedDate" default="(getdate())"/>
</config>
</field>
<field name="is deleted" type="boolean" required="true">
<config>
<sql:column name="IsDeleted" default="((0))"/>
</config>
</field>
<field name="default attention" type="char string50">
<config>
<sql:column name="DefaultAttention"/>
</config>
</field>
<field name="default phone" type="char string25">
<config>
<sql:column name="DefaultPhone"/>
</config>
</field>
<field name="default fax" type="char string25">
<config>
<sql:column name="DefaultFax"/>
</config>
</field>
</fields>
<config>
<sql:table name="BizOrgAddress"/>
</config>
</object>
</objects>
</module>
Patrick Lynch
#5 Posted : Wednesday, September 12, 2018 6:14:10 AM(UTC)


Thanks for your reply which clarifies things. Generally all my tables have a single identity field Key. So from my understanding of your generator I should not be getting these FieldSet attributes. Anyway no problem trying to solve this glitch with email or you can even call me if you wish. (209-956-4751 ask for Patrick or ext. 312) Thanks.
xomega
#6 Posted : Thursday, September 13, 2018 4:59:16 AM(UTC)
xomega



Patrick,

Thanks again for helping us troubleshoot this issue. The fix is now available in the latest Xomega release 7.7.5 for VS2017 (or 6.7.5 for VS2015). Please download and install the new version, and let us know if it works for you now.

We also did go ahead and added a couple of parameters to the Import from Database generator, which could help you customize the naming convention for the generated logical names, as follows.
  • Naming Delimiter - to use space (default), underscore or dash as a delimiter, or blank to use the DB names as is.
  • Naming Case - to use lower (default), upper or camel case for the names, or blank to use the DB names as is.

Feel free to post to our forums or contact us via email should you have any questions or need any help with Xomega.

Best,
Xomega Team
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Copyright © 2009-2022 Xomega.Net. All rights reserved.