Many relation between 2 tables

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Trixz
Posts: 31
Joined: Thu 30 Apr 2009 07:59

Many relation between 2 tables

Post by Trixz » Thu 27 Aug 2009 15:05

Hi

I have the follwing tables (* = primary keys)

Account
*CountryId
*AccountNo
Desc


Params
*Id
CountryId
Param1AccountId
Param2AccountId

And then the following FK
ACCOUNT1_FK (PARAM1ACCOUNTID, COUNTRYID)
ACCOUNT2_FK (PARAM2ACCOUNTID, COUNTRYID)


When I generate the entity model i get an error saying (badly translated)
Problem with mapping fragmen with start at row x,x: 2 entities with possible diffrent keys is mapped to the same row. Please verify that these 2 mapping fragments maps both ends of the AssosiasionSet to the corresponding column.


If I look att the mapping details of the associasion the account has accountNo and countryCode but the params table has the Id.

I can't figure out why it maps this way. Is it becouse there are multiple association between the tables? As far as I can see, the database constrains are correct and if I do a Linq to Oracle (not entity map) it seems to work.

Is it a bug? if so, is there any way to correct this manually?
[/b]

Trixz
Posts: 31
Joined: Thu 30 Apr 2009 07:59

Post by Trixz » Fri 28 Aug 2009 07:19

Update:

The problem is also when i generate a model from database when

column C1 and C2 is FK in one table and column C1 and C3 is to another...
get a message saying column C1 is mapped to

As always it's in a bit of a hurry :)

I welcome any suggestion to help me fix this

Trixz
Posts: 31
Joined: Thu 30 Apr 2009 07:59

Post by Trixz » Fri 28 Aug 2009 07:34

Made a sample from my database with one of the problems... Since i can't seems to attach files I will post it in the post

Code: Select all


  
  
    
    
      
        
          
          
          
            
            
          
        
        
          
            
            
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
        
        
          
            
            
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
        
        
          
          
          
            
              
              
            
            
              
              
            
          
        
      
    
    
    
      
        
          
          
          
            
            
          
        
        
          
            
            
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
        
        
          
            
            
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
        
        
          
          
        
      
    
    
    
      
        
          
            
              
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
              
            
          
          
            
              
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
              
            
          
          
            
              
              
            
            
              
              
            
            
          
        
      
    
  
  
  
    
      
        
      
    
    
      
        
      
    
  

The error is
Problem in mapping fragment with start on row 101 (this is not the correct row): Each of the followin column in table FAKTURAs is mapt to multiple properties on the conceptual level
FAKTURAs.LANDKOD maps to

Post Reply