wrong constuctor on entity

Posts   
 
    
Martin1
User
Posts: 10
Joined: 10-Nov-2011
# Posted on: 29-Nov-2011 15:26:49   

Hi there,

I am working with a MySQL database version 5.5 and DevArt DotConnect 6.50.237 and LLBLGEN version 3.1. I have reverse engineered an existing database with LLBLGEN and I am using the PRO framework in the selfservice mode.

I have noted that when I create and entity with the constructor that takes all the primary key fields like so:

                ProjecttaakEntity projecttaak = new ProjecttaakEntity(SessionInfo.Current.CurrentProject.Opdrnr,
                    SessionInfo.Current.CurrentProject.Prjctcode,
                    SessionInfo.Current.CurrentProject.Relnrp,
                    id);

it does not do the same thing as when I create it like so:

                ProjecttaakEntity projecttaak = new ProjecttaakEntity();
                projecttaak.Opdrnr = SessionInfo.Current.CurrentProject.Opdrnr;
                projecttaak.Prjctcode = SessionInfo.Current.CurrentProject.Prjctcode;
                projecttaak.Relnrp = SessionInfo.Current.CurrentProject.Relnrp;
                projecttaak.Taakcode = id;

The second one works correctly. I do not have time to analyze the problem but I suspect that it mixes up it's parameters when you use the constructor. I just quickly post it here because you may already be aware of this.

Because this is my last day here you can reach me at info@lindenict.nl is necessary.

Cheers, Martin.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Nov-2011 04:31:52   

Please analyze the constructor and ensure that you are passing the parameters in the correct order. The main difference between the first snippet and the other, is that in the first one (constructor) the entity is fetched in the first line. That's because you are using SelfServicing.

David Elizondo | LLBLGen Support Team