Thank you.
Is this an issue that you could address in future builds of Entity Developer? It just requires a new property "IsForeignKey" on the associations, and as far as I'm concerned it's a critical feature to be able to control.
Search found 13 matches
- Thu 18 Feb 2010 09:20
- Forum: dotConnect for Oracle
- Topic: LinqDataSource and inner/outer joins
- Replies: 9
- Views: 4378
- Wed 17 Feb 2010 12:21
- Forum: dotConnect for Oracle
- Topic: LinqDataSource and inner/outer joins
- Replies: 9
- Views: 4378
- Thu 28 Jan 2010 14:53
- Forum: Entity Developer
- Topic: OneToMany relation does not use the correct parent key
- Replies: 5
- Views: 2906
- Thu 28 Jan 2010 14:52
- Forum: dotConnect for Oracle
- Topic: Wrong relations on "Varchar not null" keys
- Replies: 2
- Views: 1086
- Wed 27 Jan 2010 10:14
- Forum: Entity Developer
- Topic: OneToMany relation does not use the correct parent key
- Replies: 5
- Views: 2906
- Mon 25 Jan 2010 11:01
- Forum: dotConnect for Oracle
- Topic: Wrong relations on "Varchar not null" keys
- Replies: 2
- Views: 1086
Wrong relations on "Varchar not null" keys
Hi,
I have two tables that both contain the field WALLET_PROMOTION_ID, VARCHAR2(10) NOT NULL.
I have mapped them in Entity Developer and created a OneToMany relation between them. The relation uses the "WalletPromotionId" on both tables.
When I query the child table and try to access a property from the parent table, the generated SQL makes this join:
This is wrong since the fields cannot be null, and thus the "IS NULL" should not be checked. The result is a very load-heavy query. The correct join should be:
I have made sure that the "Nullable" property is false on both properties.
Can you reproduce this error, and let me know what I am doing wrong?
Thanks,
Lasse
I have two tables that both contain the field WALLET_PROMOTION_ID, VARCHAR2(10) NOT NULL.
I have mapped them in Entity Developer and created a OneToMany relation between them. The relation uses the "WalletPromotionId" on both tables.
When I query the child table and try to access a property from the parent table, the generated SQL makes this join:
Code: Select all
INNER JOIN WALLET_PROMOTION t4 ON (t3.WALLET_PROMOTION_ID = t4.WALLET_PROMOTION_ID) OR ((t3.WALLET_PROMOTION_ID IS NULL) AND (t4.WALLET_PROMOTION_ID IS NULL))
Code: Select all
INNER JOIN WALLET_PROMOTION t4 ON t3.WALLET_PROMOTION_ID = t4.WALLET_PROMOTION_ID
Can you reproduce this error, and let me know what I am doing wrong?
Thanks,
Lasse
- Wed 20 Jan 2010 12:33
- Forum: Entity Developer
- Topic: OneToMany relation does not use the correct parent key
- Replies: 5
- Views: 2906
OneToMany relation does not use the correct parent key
I have a class "ContractPartner" with three properties:
Id (int, primary key)
Name (string)
PartyId (int)
I want to create a one-to-many association with another class "Port". It has a property "PartyId" that indicates which ContractPartner it belongs to.
So I've created an association with ContractPartner as the parent class and Port as the child class, and I've chosen "PartyId" as both the parent and child property to use.
But when I run my program the relation is matched on "Id" on the parent class instead of "PartyId".
If I look in the generated code, the attributes for the association looks like this:
If I change it manually to this, it works just fine:
Now how do I get my Entity Developer (using version 2.50.50) to generate this for me?
Id (int, primary key)
Name (string)
PartyId (int)
I want to create a one-to-many association with another class "Port". It has a property "PartyId" that indicates which ContractPartner it belongs to.
So I've created an association with ContractPartner as the parent class and Port as the child class, and I've chosen "PartyId" as both the parent and child property to use.
But when I run my program the relation is matched on "Id" on the parent class instead of "PartyId".
If I look in the generated code, the attributes for the association looks like this:
Code: Select all
[Association(Name="ContractPartner_Port", Storage="_ContractPartner", ThisKey="PartyId", IsForeignKey=true)]
Code: Select all
[Association(Name="ContractPartner_Port", Storage="_ContractPartner", ThisKey="PartyId", OtherKey="PartyId")]
- Mon 18 Jan 2010 12:45
- Forum: dotConnect for Oracle
- Topic: LinqDataSource and inner/outer joins
- Replies: 9
- Views: 4378
My problem is that I cannot change the database structure, but I have a situation where a two tables with the primary keys ("user_id") should be joined with a left outer join.
In the StackOverflow example only LINQ is used, and not a LinqDataSource. Are you aware of any alternative solutions to forcing a left outer join when using the LinqDataSource?
Thanks,
Lasse
In the StackOverflow example only LINQ is used, and not a LinqDataSource. Are you aware of any alternative solutions to forcing a left outer join when using the LinqDataSource?
Thanks,
Lasse
- Mon 18 Jan 2010 07:43
- Forum: dotConnect for Oracle
- Topic: LinqDataSource and inner/outer joins
- Replies: 9
- Views: 4378
- Fri 15 Jan 2010 14:35
- Forum: dotConnect for Oracle
- Topic: LinqDataSource and inner/outer joins
- Replies: 9
- Views: 4378
LinqDataSource and inner/outer joins
Hi,
I'm using dotConnect for Oracle and LinqDataSources to display data in a grid. When checking the dbMonitor I can see that some calls result in INNER JOINS and some in LEFT OUTER JOINS. When for instance I'm using this select parameter in my LinqDataSource:
I get this call in dbMonitor:
As you can see there is one LEFT OUTER JOIN and one INNER JOIN. Now what determines which join is used? I'm assuming that it has something to do with the relationships in the Entity Developer model, but I can't seem to figure out what exactly.
I hope you can help!
Lasse
I'm using dotConnect for Oracle and LinqDataSources to display data in a grid. When checking the dbMonitor I can see that some calls result in INNER JOINS and some in LEFT OUTER JOINS. When for instance I'm using this select parameter in my LinqDataSource:
Code: Select all
Select="new(TransId, Port.Name AS Portal, CreatedDate, UserMobileInf.Msisdn, UserEmail)">
Code: Select all
SELECT [....]
FROM [...] t2
LEFT OUTER JOIN USER_MOBILE_INF t3 ON t2.USER_ID = t3.USER_ID
INNER JOIN PORTS t4 ON t2.PORTAL_ID = t4.PORTAL_ID
WHERE [...]
I hope you can help!
Lasse
- Wed 13 Jan 2010 09:39
- Forum: Entity Developer
- Topic: How to add Serializable attribute to generated classes
- Replies: 2
- Views: 2746
- Tue 12 Jan 2010 09:58
- Forum: Entity Developer
- Topic: How to add Serializable attribute to generated classes
- Replies: 2
- Views: 2746
How to add Serializable attribute to generated classes
Hi,
How do I get Entity Developer to include the attribute [Serializable] to all the generated classes? I can only make it generate the [DataContract()]. I hope you can provide a solution for this.
I'm using Entity Developer version 2.50.50
Thanks in advance,
Lasse
How do I get Entity Developer to include the attribute [Serializable] to all the generated classes? I can only make it generate the [DataContract()]. I hope you can provide a solution for this.
I'm using Entity Developer version 2.50.50
Thanks in advance,
Lasse
- Mon 23 Nov 2009 09:03
- Forum: dotConnect for Oracle
- Topic: Bulk Insert of VARRAYS
- Replies: 11
- Views: 5980
Hi,
I've installed the latest build, but I'm still getting this error when trying to insert via ExecuteArray:
Is this caused by a bug in dotConnect, and is there a known way to resolve it?
Thanks,
lasseschou
I've installed the latest build, but I'm still getting this error when trying to insert via ExecuteArray:
Code: Select all
Argument 'Iters' must be equal to ArrayLength.
Thanks,
lasseschou