Print Page | Close Window

Support of composite fields

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=1736
Printed Date: 28-Mar-2024 at 9:02am


Topic: Support of composite fields
Posted By: AlbersC
Subject: Support of composite fields
Date Posted: 21-Apr-2010 at 8:07am
Hello All,
I'm wondering whether IdeaBlade supports composite fields. We currently are mapping to a SQL Server database that contains some composite fields in their tables.
 
An example:
 
A table contains a composite field called Index1 which consists of:
 
Part (Index1[0..14]) + ProductionLot (= Index1[15..25])
 
where Part consists of:
 
PartNr = Index1[0..3]
PartVar = Index1[4..10]
PartSeqNr = Index1[11..14]
 
and where ProductionLot consists of:
 
BatchNr = Index1[15..20]
SeqNr = Index1[21..25]
 
Thanks for helping me out!
 
Br,
Corne Albers



Replies:
Posted By: WardBell
Date Posted: 21-Apr-2010 at 12:45pm

I'm not sure I understand the question. I don't know what you mean by "A table contains a composite field called Index1". 

AFIK every column in SQL Server is single valued; I don't think SQL Server supports array fields. Maybe I've been away too long.
 
I do follow you if what you mean is that there is a conceptual composite field, implemented as a set of columns of a table that collectively constitute the "composite".
 
We support this, calling it a "Complex Type" in keeping with Entity Framework's support for this notion.
 
Is that what you had in mind?


Posted By: AlbersC
Date Posted: 22-Apr-2010 at 1:04am
Hi,
Thanks a lot for your quick response. Indeed it's a conceptual composite field what I meant. We have ported the SQL Server database from a database (Oracle7) that was generated by a RAD-tool (Nectar). In that "modelling" tool it was possibile to define composite fields like I explained above (still they were stored as a string field in the database). In our code we referenced to a part of a composite field like:
 
Part.PartNr -or- ProductionLot.BatchNr
 
and the "modelling" tool took care of splitting the conceptual composite field into the correct sub fields.
 
Are "Complex Types" also supported in DevForce version 3.6.5 as well? If not, in which version they are and is it possible to upgrade from v3.6.5 to that version of IdeaBlade?
 
Thanks a lot for your support!
 
Br
 
Corne Albers


Posted By: WardBell
Date Posted: 22-Apr-2010 at 11:43am
Still not clear if you have packed the information into a single field as a formatted string or if you've distributed the parts of the composite "Part Number" among columns of the table. Complex Types are intended for the later scenario.
 
Also not clear if you're saying that the same table columns could be interpreted EITHER as one type (Part.PartNr) or another type (ProductionLot.BatchNr), depending upon context. If column interpretation is "flexible", you won't be able to use Complex Types. In other words, there must be a single meaning to the columns that constitute a conceptual composite. 
 
If the same columns can mean different things, you'll have to treat them as separate properties and devise custom properties in your business objects to differentiate the various "composite" interpretations. That's not hard to do either (and is viable in all versions of DevForce).
 
-- 
 
Complex Types are supported in DevForce 2009 (v.5.x) and DevForce 2010 (v.6.x) but not DevForce 2005 ("Classic", v.3.x).
 
Complex Type support is latent in DF 2009 because the Entity Framework v.1 DESIGNER didn't support them; you had to play tricks with the XML in the EDMX. VS 2010 removes that obstacle, possibly for EF v.1 as well.
 
In any case, I strongly recommend making the move to DF 2010. Contact mailto:sales@ideablade.com - sales@ideablade.com  , especially if you are an existing customer.
 
 
 



Print Page | Close Window