Hmm, difficult to see the diff. Is the only change the line?
LET references.select(r | !r.many &&
r.to.hasOwnDatabaseRepresentation()).reject(e|e.isOneToOne() &&
e.isInverse()).size != 0 AS hasOneReferences
I tried that and it works with the ddlbug sample.
I will do some more tests.
/Patrik
PaloT wrote:
>
> Hello Patrik,
> I'm busy working on my project and I have no time for testing. I'm
> veeeeery sorry for this. I will have time to work on it in 2 weeks.
> Here is my best guess patch ;-) (should I compile it before send?).
>
> --- src/main/resources/templates/MysqlDDL.xpt (revision 4226)
> +++ src/main/resources/templates/MysqlDDL.xpt (working copy)
> @@ -52,7 +52,7 @@
> �DEFINE createTable(Boolean manyToManyRelationTable) FOR DomainObject-�
> �LET module == null ? {} :
> module.application.modules.domainObjects.references.select(e | e.to ==
> this && e.many && e.opposite == null && e.isInverse()) AS
> uniManyToThis -�
> �LET !uniManyToThis.isEmpty AS hasUniManyToThis -�
> - �LET references.select(r | !r.many &&
> (r.to.hasOwnDatabaseRepresentation())).size != 0 AS hasOneReferences
> -�
> + �LET references.select(r | !r.many &&
> r.to.hasOwnDatabaseRepresentation()).reject(e|e.isOneToOne() &&
> e.isInverse()).size != 0 AS hasOneReferences -�
> �LET getBasicTypeReferences().size != 0 AS hasContainedColumns -�
> �LET references.select(r | r.to.metaType == Enum).size != 0 AS
> hasEnumColumns -�
> �LET getNaturalKeyReference() != null ||
> !getNaturalKeyAttributes().isEmpty || attributes.exists(a | a.name ==
> "uuid") AS hasUniqueConstraints -�
>
> Again sorry
>
> Pavel
>
>
> On Mon, Mar 2, 2009 at 9:57 PM, Patrik Nordwall
> <[email protected]> wrote:
>>
>> Thanks for reporting. I have created a jira issue:
>> http://www.fornax-platform.org/tracker/browse/CSC-310
>>
>> As a workaround you can try to add a dummy String attribute to the
>> entity.
>>
>> /Patrik
>>
>>
>> r_star wrote:
>>>
>>> Hello
>>>
>>> Using the following DSL in model.design...
>>>
>>> Application ddlbugapp
>>> {
>>> basePackage=com.test.pkg
>>> Module ddlbug
>>> {
>>>
>>> Entity ConcreteEngEntity
>>> {
>>> - @PYDEntity trPYDEntity <-> ceeEntity
>>> }
>>>
>>>
>>> Entity PYWEntity
>>> {
>>> !aggregateRoot
>>> !auditable
>>> - @PYDEntity PYDEntity <-> PYWEntitys
>>> }
>>>
>>> Entity PYDivEntity
>>> {
>>> !aggregateRoot
>>> !auditable
>>> - @PYDEntity PYDEntity <-> PYDivEntitys
>>> }
>>>
>>> Entity PYIEntity
>>> {
>>> !aggregateRoot
>>> !auditable
>>> - @PYDEntity PYDEntity <-> PYIEntity
>>> }
>>>
>>> Entity PYDEntity
>>> {
>>> !aggregateRoot
>>> !auditable
>>> - @ConcreteEngEntity ceeEntity <-> trPYDEntity
>>> - Set<@PYIEntity> PYIEntity <-> PYDEntity
>>> - Set<@PYDivEntity> PYDivEntitys <-> PYDEntity
>>> - Set<@PYWEntity> PYWEntitys <-> PYDEntity
>>> }
>>> }
>>> }
>>>
>>> ...results in a CREATE in my DDL that looks like the following...
>>>
>>>
>>> CREATE TABLE PYDENTITY (
>>> ID NUMBER(20) NOT NULL,
>>> UUID VARCHAR2(255) NOT NULL,
>>> VERSION NUMBER(20) NOT NULL ,
>>>
>>>
>>> );
>>>
>>>
>>> Notice the trailing comma.
>>>
>>> From my POM...
>>>
>>> groupId: org.fornax.cartridges
>>> artifactId: fornax-cartridges-sculptor-generator
>>> version: 1.5.0
>>>
>>> groupId:org.fornax.cartridges
>>> artifactId: fornax-cartridges-sculptor-framework
>>> version: 1.5.0
>>>
>>> I would appreciate any help/fixes.
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Trailing-Comma-in-Generated-DDL-tp22279961s17564p22296549.html
>> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a $600 discount off the registration fee with the source code:
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Fornax-developer mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Fornax-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>
>
--
View this message in context:
http://www.nabble.com/Trailing-Comma-in-Generated-DDL-tp22279961s17564p22318452.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer