Print Page | Close Window

Several problems when creating mapping

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1671
Printed Date: 23-Apr-2025 at 1:12pm


Topic: Several problems when creating mapping
Posted By: MattGreer
Subject: Several problems when creating mapping
Date Posted: 04-Mar-2010 at 2:56pm
my company is using what I believe is DevForce classic (our IdeaBlade.Persistence.dll assembly is version 3.6.4.1)

I have created many mappings using the IdeaBlade Object Mapper in Visual Studio 2008 SP1 with no problem. But suddenly DevForce just does not like a new table I made. We are using SQL Server 2008.

Here is what I have done:
created a table called RollbackFactor, with columns:
-- Id, PK, uniqueidentifier, not null
-- RecordVersion, int, not null
-- ParcelTypeId, FK, uniqueidentifier, not null
-- PropertyClassId, FK, uniqueidentifier, not null
-- a few data columns of type numeric(3,0) null

the two foreign keys are to tables that are also being mapped by DevForce. These foreign keys are defined in SQL Server.

For our mappings, we have one base class called BaseEntity. A BaseEntity must have Id and RecordVersion.


This is what happens when I try to map this using the object mapper:
-- I click "Add Classes"
-- Locate RollbackFactor, select it, close the add classes form
-- RollbackFactor is not listed in the Classes grid, I must check "Show all classes" to see it (this is different from all previous mappings)
-- I look at RollbackFactor's details, set its base class to BaseEntity, and I get a validation error (an ErrorProvider exclamation point appears) that indicates a null ref exception, this has never happened before.
-- Over in Relation Properties, only one of the relations (ParcelTypeId) is created. It never wants to make the PropertyClassId relation
-- If I double click to add the relation manually, Visual Studio crashes upon saving the PropertyClassId relation.

I have poured over this table numerous times, compared it to all our other tables, and had two other developers verify it all appears OK to them. I have also dropped the table and recreated it, to no avail.

What am I doing wrong?

Thanks.




Replies:
Posted By: davidklitzke
Date Posted: 04-Mar-2010 at 4:12pm

The only problem that I know about that we have heard from our customers concerning use of SQL Server 2008 is with the new Date and Time datataypes.  These datatypes are not supported in Classic.



Posted By: MattGreer
Date Posted: 05-Mar-2010 at 7:57am
We aren't using Date or Time anywhere (although occassionally we use datetime). However none of the temporal data types are involved in this particular situation.

I have found that removing the PropertyClassId FK allows the object mapper to do its entire thing without any issues (no null ref exception and all that). However that also means I still dont get my PropertyClass relation.

Other tables in our db have a PropertyClass FK as well. Could it be somewhere a clash is happening? This seems like it might be a DevForce bug?

Thanks.



Print Page | Close Window