[SOLVED] Re : Switching to MySQL reveals a problem?
[SOLVED] Re : Switching to MySQL reveals a problem?
- Subject: [SOLVED] Re : Switching to MySQL reveals a problem?
- From: Marc-Alexis Côté <email@hidden>
- Date: Mon, 28 Mar 2005 18:58:07 -0500
OK, I have solved the problem... It's another case of the "switching
prototypes deletes column names" problem. However, it only became apparent
after forcefully quitting EOModeler and restarting it... When I switched it,
it left the column names intact...
Le 28/03/05 18:40, « Marc-Alexis Côté » <email@hidden> a écrit :
> Hello everybody,
> I am trying to switch my database from OpenBase to MySQL. The reasons for this
> are twofold: 1) I want to see if it's easy to do, 2) $$$. The switch proceeded
> rather nicely until I started my application (duh! :)). I can insert data into
> the database, but a problem that didn't occur with OpenBase shows up the
> minute I try to fetch data: I get an SQL exception. Looking at the SQL that is
> generated, the problem seems obvious:
>
> "SELECT t0.active, RTRIM(t0.additionalInformation), t0.,
> RTRIM(t0.contactName), t0.creationDate, RTRIM(t0.dealershipName),
> RTRIM(t0.email), t0.id, RTRIM(t0.faxNumber), t0.lastLogin, RTRIM(t0.password),
> RTRIM(t0.phoneNumber), t0., t0.type, RTRIM(t0.username) FROM Dealer t0 WHERE
> t0.username = ?" withBindings: 1:"marcalexis"(username)>
>
> I am no SQL expert, but that t0. doesn't seem right! Just for fun, I tried to
> switch to postgres, but I have the same problem. I guess the problem comes
> from my eomodel. But when I look at it, I can't see anything wrong. Do you
> guys have any idea what is the cause of this problem?
>
> Thanks,
>
> Marc-Alexis
>
> P.S. I guess the first thing you will ask me for is Dealer.plist, so here it
> goes:
>
> {
> attributes = (
> {columnName = active; name = active; prototypeName = boolean; },
> {
> columnName = additionalInformation;
> name = additionalInformation;
> prototypeName = varchar1000;
> },
> {name = administrativeAddressFid; prototypeName = fid; },
> {columnName = contactName; name = contactName; prototypeName =
> varchar100; },
> {columnName = creationDate; name = creationDate; prototypeName =
> dateTime; },
> {
> columnName = dealershipName;
> name = dealershipName;
> prototypeName = varchar100;
> },
> {columnName = email; name = email; prototypeName = varchar100; },
> {name = entityId; prototypeName = id; },
> {columnName = faxNumber; name = faxNumber; prototypeName = varchar50;
> },
> {
> allowsNull = Y;
> columnName = lastLogin;
> name = lastLogin;
> prototypeName = dateTime;
> },
> {columnName = password; name = password; prototypeName = varchar16; },
> {columnName = phoneNumber; name = phoneNumber; prototypeName =
> varchar50; },
> {name = shippingAddressFid; prototypeName = fid; },
> {
> columnName = type;
> externalType = char;
> name = type;
> serverTimeZone = "America/Montreal";
> valueClassName = NSString;
> width = 1;
> },
> {columnName = username; name = username; prototypeName = varchar16; }
> );
> attributesUsedForLocking = (
> entityId,
> username,
> password,
> email,
> dealershipName,
> contactName,
> phoneNumber,
> faxNumber,
> additionalInformation,
> shippingAddressFid,
> administrativeAddressFid,
> type,
> active
> );
> className = Dealer;
> classProperties = (
> username,
> password,
> email,
> dealershipName,
> contactName,
> phoneNumber,
> faxNumber,
> additionalInformation,
> administrativeAddress,
> shippingAddress,
> creationDate,
> lastLogin,
> type,
> manufacturers,
> active
> );
> externalName = Dealer;
> name = Dealer;
> parent = AbstractUser;
> primaryKeyAttributes = (entityId);
> relationships = (
> {
> deleteRule = EODeleteRuleCascade;
> destination = Address;
> isToMany = N;
> joinSemantic = EOInnerJoin;
> joins = (
> {destinationAttribute = entityId; sourceAttribute =
> administrativeAddressFid; }
> );
> name = administrativeAddress;
> ownsDestination = Y;
> },
> {
> deleteRule = EODeleteRuleCascade;
> destination = DealerManufacturer;
> isToMany = Y;
> joinSemantic = EOInnerJoin;
> joins = ({destinationAttribute = entityId; sourceAttribute =
> entityId; });
> name = dealerManufacturers;
> propagatesPrimaryKey = Y;
> },
> {
> definition = "dealerManufacturers.manufacturer";
> joinSemantic = EOInnerJoin;
> name = manufacturers;
> },
> {
> deleteRule = EODeleteRuleCascade;
> destination = Address;
> isToMany = N;
> joinSemantic = EOInnerJoin;
> joins = ({destinationAttribute = entityId; sourceAttribute =
> shippingAddressFid; });
> name = shippingAddress;
> ownsDestination = Y;
> }
> );
> }
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden