From afc5be9d35ef157da31f8225c7f35e72292a7350 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 13 Feb 2008 15:56:31 +0000 Subject: [PATCH] In Applied Sweepers, the big problem of linking between the two databases is now solved, and the solution is reasonably good. I don't believe there's any ASL-specific special purpose code in here, but there is code which addresses the issue of one-one joins between databases which may need to be revisited. Also, if a 'database' parameter is passed, link tables get the prefix '$database.dbo.', which I think is an MS SQL Server specific convention. --- schemas/adl-0.dtd | 10 +++--- transforms01/adl2entityclass.xslt | 35 ++++++++++++++---- transforms01/adl2hibernate.xslt | 60 ++++++++++++++++++++++++------- 3 files changed, 80 insertions(+), 25 deletions(-) diff --git a/schemas/adl-0.dtd b/schemas/adl-0.dtd index 96efe12..b078d09 100755 --- a/schemas/adl-0.dtd +++ b/schemas/adl-0.dtd @@ -13,7 +13,7 @@ @@ -142,15 +142,11 @@ name: the name of this application version: the version number of this application - assembly: C# implementation detail, DEPRECATED: should not be here - namespace: C# implementation detail, DEPRECATED: should not be here xmlns: XML namespace, in case required --> @@ -270,7 +266,9 @@ if type='list', the name of the entity that has a foreign key link to this entity farkey: if type='list', the name of farside key in the listed - entity + entity; if type='entity' and the farside field to join to + is not the farside primary key, then the name of that + farside field required: whether this propery is required (i.e. 'not null'). size: fieldwidth of the property if specified. concrete: if set to 'false', this property is not stored in the diff --git a/transforms01/adl2entityclass.xslt b/transforms01/adl2entityclass.xslt index 56e6cb9..4026c89 100755 --- a/transforms01/adl2entityclass.xslt +++ b/transforms01/adl2entityclass.xslt @@ -8,8 +8,8 @@ Transform ADL into entity classes $Author: sb $ - $Revision: 1.4 $ - $Date: 2008-02-06 17:24:53 $ + $Revision: 1.5 $ + $Date: 2008-02-13 15:56:31 $ --> + select="substring( '$Revision: 1.5 $', 11)"/> @@ -337,11 +335,11 @@ = null - = false + = false = 0 = 0.0M = 0.0 - = null + = null @@ -427,6 +425,29 @@ } } + + /* generate primitive value getter/setter for key property of type entity (experimental) */ + + + + + + private + = false + = 0 + = 0.0M + = 0.0 + = null + [unknown? ] + + ; + + public virtual { + get { return ; } + set { = value; } + } + + diff --git a/transforms01/adl2hibernate.xslt b/transforms01/adl2hibernate.xslt index 9af69d0..f786d96 100755 --- a/transforms01/adl2hibernate.xslt +++ b/transforms01/adl2hibernate.xslt @@ -12,7 +12,7 @@ Transform ADL to Hibernate $Author: sb $ - $Revision: 1.5 $ + $Revision: 1.6 $ --> - + @@ -258,6 +289,11 @@ + + + + + @@ -268,8 +304,8 @@ - - + @@ -330,10 +366,10 @@ - + - +