Project

General

Profile

Anomalie #1231

Duplicate generate Repository column

Added by Mickael G. almost 8 years ago. Updated over 7 years ago.

Status:
Fermé
Priority:
Urgent
Assignee:
Gregg C.
Category:
-
Target version:
Start date:
12/15/2012
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

si dans une entity, j'ai :

/** Address principal */
@OneToOne
protected Address addressPrincipal;
/** Address delivery */
@OneToOne
protected Address addressDelivery;

cela génère dans la RepositoryBase:

public static final String REF_ADDRESS_ID = "addressDelivery";
public static final String REF_ADDRESS_ID = "addressPrincipal";
public static final String[] COLS = new String[] {
... ,
REF_ADDRESS_ID,
REF_ADDRESS_ID
};
public static final String getSchema() {
return "CREATE TABLE "
+ TABLE_NAME + " ("
+ ...
+ REF_ADDRESS_ID + " int NOT NULL,"
+ REF_ADDRESS_ID + " int NOT NULL,"
+ ...
+ "FOREIGN KEY("+REF_ADDRESS_ID+") REFERENCES Address("+AddressAdapterBase.COL_ID+")"
+ "FOREIGN KEY("+REF_ADDRESS_ID+") REFERENCES Address("+AddressAdapterBase.COL_ID+")"
+ ");";
}
public static ContentValues accountToContentValues(Account account) {        
ContentValues result = new ContentValues();
result.put(REF_ADDRESS_ID, String.valueOf(account.getAddressDelivery().getId()) );
result.put(REF_ADDRESS_ID, String.valueOf(account.getAddressPrincipal().getId()) );
return result;
}

and many exception...


Recurrences

History

#4Updated by Gregg C. almost 8 years ago

Appliqué par commit commit:8ff20ca805f6d69f1726b3a55993e9e21f0d1994.

Also available in: Atom PDF

Go to top
Add picture from clipboard (Maximum size: 200 MB)