Search found 13 matches

by lasseschou
Thu 18 Feb 2010 09:20
Forum: dotConnect for Oracle
Topic: LinqDataSource and inner/outer joins
Replies: 9
Views: 4378

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.
by lasseschou
Wed 17 Feb 2010 12:21
Forum: dotConnect for Oracle
Topic: LinqDataSource and inner/outer joins
Replies: 9
Views: 4378

Hi Andrey,

is there a way to control the IsForeignKey through the Entity Developer?
by lasseschou
Thu 28 Jan 2010 14:53
Forum: Entity Developer
Topic: OneToMany relation does not use the correct parent key
Replies: 5
Views: 2906

Fantastic! How can I get notified when the next build is ready for download?
by lasseschou
Thu 28 Jan 2010 14:52
Forum: dotConnect for Oracle
Topic: Wrong relations on "Varchar not null" keys
Replies: 2
Views: 1086

I've sent you a mail with all requested files. Please let me know if you haven't received it.
by lasseschou
Wed 27 Jan 2010 10:14
Forum: Entity Developer
Topic: OneToMany relation does not use the correct parent key
Replies: 5
Views: 2906

Hi,

any idea about the ETA of this fix?

Lasse
by lasseschou
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:

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))
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:

Code: Select all

INNER JOIN WALLET_PROMOTION t4 ON t3.WALLET_PROMOTION_ID = t4.WALLET_PROMOTION_ID
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
by lasseschou
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:

Code: Select all

[Association(Name="ContractPartner_Port", Storage="_ContractPartner", ThisKey="PartyId", IsForeignKey=true)]
If I change it manually to this, it works just fine:

Code: Select all

[Association(Name="ContractPartner_Port", Storage="_ContractPartner", ThisKey="PartyId", OtherKey="PartyId")]
Now how do I get my Entity Developer (using version 2.50.50) to generate this for me?
by lasseschou
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
by lasseschou
Mon 18 Jan 2010 07:43
Forum: dotConnect for Oracle
Topic: LinqDataSource and inner/outer joins
Replies: 9
Views: 4378

Ok, thanks.

But is there any way to curcumvent this feature, apart from setting isPrimaryKey to false?
by lasseschou
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:

Code: Select all

Select="new(TransId, Port.Name AS Portal, CreatedDate, UserMobileInf.Msisdn, UserEmail)">
I get this call in dbMonitor:

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 [...]
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
by lasseschou
Wed 13 Jan 2010 09:39
Forum: Entity Developer
Topic: How to add Serializable attribute to generated classes
Replies: 2
Views: 2746

Perfect, thanks!
by lasseschou
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
by lasseschou
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:

Code: Select all

Argument 'Iters' must be equal to ArrayLength.
Is this caused by a bug in dotConnect, and is there a known way to resolve it?

Thanks,

lasseschou