Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Attribute not emitted
 

Pages: 1
Bugs & Issues
Attribute not emitted
Page:1/1 

  Print all messages in this thread  
Poster Message
yowl
User



Location:
Colombia
Joined on:
11-Feb-2008 10:35:17
Posted:
169 posts
# Posted on: 30-Jan-2019 14:55:58.  
Hi,

Is there a problem with attributes on fields mapped to related fields using NetStandard preset?

I have this in the proj file:
Code:

        <Forfs>
         <Forf Name="CompanyName" MappedField="Reference:Company:Name" RelationshipName="Reference.ClientAccountCompany.Company-Reference.Company.ClientAccountCompanies" ViaStartNavigator="true" IsReadOnly="true">
            <OutputSettingValues>
             <Attributes>
                <Attribute Value="XmlIgnore" />
                <Attribute Value="someotherthing" />
             </Attributes>
            </OutputSettingValues>
         </Forf>
        </Forfs


But when generating the c# the attributes are not there.

LLBLGen 5.5
Adapter
Preset SD.Presets.Adapter.General.Netstandard
Target Platform netstandard 2.0 c#
Runtime framework: LLBLGen
  Top
yowl
User



Location:
Colombia
Joined on:
11-Feb-2008 10:35:17
Posted:
169 posts
# Posted on: 30-Jan-2019 15:16:32.  
I tried .net 4.7 and the standard preset and also didn't get the attribute, maybe I've forgotten something basic about how this works, seems fine on ordinary fields though.

  Top
yowl
User



Location:
Colombia
Joined on:
11-Feb-2008 10:35:17
Posted:
169 posts
# Posted on: 30-Jan-2019 16:11:20.  
It pulls the attributes from the related entity, which seems odd. Template is

Code:
        /// <summary>Gets <[ If Not IsReadOnly ]>/ Sets <[ EndIf ]>the value o xxxxxf the related field this.<[ MappedFieldNameRelation ]>.<[ RelatedEntityFieldName ]>.<br/><br/><[Foreach CustomProperty RelatedEntityField]><[CustomPropertyName]>: <[CustomPropertyValue]><br/><[NextForeach]><[Description]></summary><[Foreach Attribute RelatedEntityField]>
    aaaa    <[Attribute]><[NextForeach]


I've added some instrumentation to try to see what was going on.
  Top
yowl
User



Location:
Colombia
Joined on:
11-Feb-2008 10:35:17
Posted:
169 posts
# Posted on: 30-Jan-2019 16:46:50. Goto attachments  
here's a sample project. Codegen it and you'll see that the resulting AlertEntity on its mapped field, AgreedAmt, has the attributes from the ClaimEntity, not one set in the designer for the AlertEntity.

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37313 posts
# Posted on: 30-Jan-2019 17:13:37.  
It indeed pulls them from the related field. The problem is: we can't change this now, as it's a breaking change. See: https://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=26587

It's scheduled to be fixed in v5.6 as we can break things there. Please read the thread above for more details. I'm going to close this thread now, not because we don't want to fix the issue, we do want to fix it, but because it's already reported and we can't do much else than fix it in v5.6 as it's a breaking change.

Sorry for this inconvenience...
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
yowl
User



Location:
Colombia
Joined on:
11-Feb-2008 10:35:17
Posted:
169 posts
# Posted on: 30-Jan-2019 17:14:59.  
Thanks for the quick reply.

  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.