New Posts New Posts RSS Feed: Support of composite fields
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Forum LockedSupport of composite fields

 Post Reply Post Reply
Author
AlbersC View Drop Down
Newbie
Newbie
Avatar

Joined: 21-Apr-2010
Location: The Netherlands
Posts: 2
Post Options Post Options   Quote AlbersC Quote  Post ReplyReply Direct Link To This Post Topic: Support of composite fields
    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
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
AlbersC View Drop Down
Newbie
Newbie
Avatar

Joined: 21-Apr-2010
Location: The Netherlands
Posts: 2
Post Options Post Options   Quote AlbersC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post 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 sales@ideablade.com , especially if you are an existing customer.
 
 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down