Search found 17 matches

by ruda
Fri 13 May 2022 11:47
Forum: Entity Developer
Topic: Reference to a table that is TPT (always update)
Replies: 7
Views: 17036

Re: Reference to a table that is TPT (always update)

The solution presented does not make sense.
It's creating a new model.
I lose all the renamed properties, all the created TPTs…
A production project with more than 500 tables is unfeasible.

The problem remains.
Rebuild model is not intended to resolve update issues.
by ruda
Thu 12 May 2022 15:13
Forum: Entity Developer
Topic: Reference to a table that is TPT (always update)
Replies: 7
Views: 17036

Re: Reference to a table that is TPT (always update)

The issue at hand is the TestRef table reference with Dog.
The TPT is created correctly.
by ruda
Wed 11 May 2022 21:23
Forum: Entity Developer
Topic: Reference to a table that is TPT (always update)
Replies: 7
Views: 17036

Re: Reference to a table that is TPT (always update)

1. EF Core
2. It is not removed. the Entity Developer that does not create.
3. Yes
by ruda
Mon 09 May 2022 19:32
Forum: Entity Developer
Topic: Visual Studio 2022
Replies: 29
Views: 1088345

Re: Visual Studio 2022

belidzs wrote: Fri 18 Feb 2022 08:05 Don't hold your breath. I've paid for another year of license fee back in November, because I just assumed that they must have already added support VS2022, like any other respectable component supplier did at the time.

They had access to betas, RCs, and other preview versions which they could've leveraged to ensure dotconnect's compatibility by the official launch. They just don't care about this products and their subscribers anymore.
This is one of the biggest problems.
Updates occur a maximum of 3 times a year. Reported bugs take months for any updates to come out. Which harms the project. Paying a license to have few updates is complicated.

I went to migrate to EF Core and found more than 6 bugs and some impediments that I could use. Frustrated, we paid the license and were unable to use it.
by ruda
Mon 09 May 2022 14:42
Forum: Entity Developer
Topic: Losing property name after updating model
Replies: 3
Views: 18915

Losing property name after updating model

Version: 6.12.1419
EF Core

I detected a problem, to occur was like this:

Code: Select all

CREATE DATABASE TestED
GO

USE TestED
GO

CREATE TABLE [dbo].[TableA]
(
[TableAId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1)
)
GO

CREATE TABLE [dbo].[TableB]
(
[TableBId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1),
[TableAId] [int] NOT NULL,
[TableAId_Other] [int] NULL
)
GO

ALTER TABLE [dbo].[TableB] ADD CONSTRAINT [FK_TableB_TableA] FOREIGN KEY ([TableAId]) REFERENCES [dbo].[TableA] ([TableAId])
GO
ALTER TABLE [dbo].[TableB] ADD CONSTRAINT [FK_TableB_TableA_Other] FOREIGN KEY ([TableAId_Other]) REFERENCES [dbo].[TableA] ([TableAId])
GO

CREATE TABLE [dbo].[TableC]
(
[TableCId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1),
)
GO
I add to the model TabelA and TableT.
I rename the two navigation properties to TableA and TableAOther

Image Image Image

If I immediately add the TableC, the problem does not occur.

But if I close the model and open it again, and add the TableC or have any changes in the database and want to update, I lose the changes I made to the name.

This is a huge bug.
I have over 500 tables and with the navigation properties renamed and if I update anything in the layout I totally get close to the work I've done.

This happened the first time. I saved it, closed it and remembered that I needed to add a field.
Soon after I adjusted and lost everything I had done.
by ruda
Mon 09 May 2022 14:13
Forum: Entity Developer
Topic: Two Unique Always Update
Replies: 1
Views: 9916

Two Unique Always Update

Version: 6.12.1419
EF Core

I detected a problem, to occur was like this:

Code: Select all

CREATE DATABASE TestED
GO

USE TestED
GO

CREATE TABLE [dbo].[TableA]
(
	[TableAId] INT NOT NULL PRIMARY KEY IDENTITY(1, 1),
	[SType] [INT] NOT NULL,
	[Cod] [NVARCHAR] (50) NULL,
	[Name] [NVARCHAR] (200) NOT NULL
)
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_TableA_SType_Cod] ON [dbo].[TableA] ([SType], [Cod]) WHERE ([Cod] IS NOT NULL)
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_TableA_SType_Name] ON [dbo].[TableA] ([SType], [Name]) WHERE ([Cod] IS NULL)
GO
This occurs when there are two UNIQUE (one did not).
In this my UNIQUE has a where but it made no difference in the problem.

It doesn't recognize it and is also in the update loop of always thinking it has changed.

Image
by ruda
Mon 09 May 2022 13:43
Forum: Entity Developer
Topic: Reference to a table that is TPT (always update)
Replies: 7
Views: 17036

Reference to a table that is TPT (always update)

Version: 6.12.1419

I detected a problem, to occur was like this:

Code: Select all

CREATE DATABASE TestED
GO

USE [TestED]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Animal](
	[AnimalId] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Animal] PRIMARY KEY CLUSTERED 
(
	[AnimalId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Cat](
	[AnimalId] [int] NOT NULL,
	[FieldB] [int] NOT NULL,
 CONSTRAINT [PK_Cat] PRIMARY KEY CLUSTERED 
(
	[AnimalId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dog](
	[AnimalId] [INT] NOT NULL,
	[Field1] [NVARCHAR](10) NOT NULL,
 CONSTRAINT [PK_Dog] PRIMARY KEY CLUSTERED 
(
	[AnimalId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[TestRef](
	[TestRefId] [INT] IDENTITY(1,1) NOT NULL,
	[TesAB] [NVARCHAR](50) NOT NULL,
	[AnimalId_Dog] [INT] NOT NULL,
 CONSTRAINT [PK_TestRef] PRIMARY KEY CLUSTERED 
(
	[TestRefId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Cat]  WITH CHECK ADD  CONSTRAINT [FK_Cat_Animal] FOREIGN KEY([AnimalId])
REFERENCES [dbo].[Animal] ([AnimalId])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[Cat] CHECK CONSTRAINT [FK_Cat_Animal]
GO

ALTER TABLE [dbo].[Dog]  WITH CHECK ADD  CONSTRAINT [FK_Dog_Animal] FOREIGN KEY([AnimalId])
REFERENCES [dbo].[Animal] ([AnimalId])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[Dog] CHECK CONSTRAINT [FK_Dog_Animal]
GO

ALTER TABLE [dbo].[TestRef]  WITH CHECK ADD  CONSTRAINT [FK_TestRef_Dog] FOREIGN KEY([AnimalId_Dog])
REFERENCES [dbo].[Dog] ([AnimalId])
GO

ALTER TABLE [dbo].[TestRef] CHECK CONSTRAINT [FK_TestRef_Dog]
GO
I add the first 3 tables for me to create the TPT
Looking like this:

Image Image Image Image

I find a bug here as I create the TPT and then remove the references to the Animal table it doesn't update the diagram, because the AnimalId fields are still visible. But if I save and then reopen the model it disappears.
But something that does not impact. But I spent a few hours thinking I was doing something wrong.

Then I add another TableRef table to the model.

With that it does not create the reference to the Dog table.
And it stays in the update loop.

Image Image

If I add all the tables before creating the TPT it adds the reference correctly.
But it stays in the update loop too.

Image
by ruda
Mon 09 May 2022 12:43
Forum: Entity Developer
Topic: Efml Update from database, column NEXT VALUE
Replies: 4
Views: 13885

Re: Efml Update from database, column NEXT VALUE

I ended up doing the test with the varchar field for the NEXT VALUE and had no problem.
But if it is an integer field (bigint, int...) the problem occurs.
by ruda
Mon 09 May 2022 12:39
Forum: Entity Developer
Topic: Efml Update from database, column NEXT VALUE
Replies: 4
Views: 13885

Re: Efml Update from database, column NEXT VALUE

I did like this:

Code: Select all

CREATE DATABASE Test57216
GO

USE Test57216
GO

CREATE SEQUENCE [dbo].[Forum57216_sequence] AS [int]
GO

CREATE TABLE Forum57216(
Forum57216Id int Primary Key,
Id int DEFAULT NEXT VALUE FOR [dbo].[Forum57216_sequence]
)
GO
I created a new model and made an update to add the table.
Then I did the update again and it alerts that the column has been modified.
If I do the update again, the same alert of the modified column appears (it doesn't come out of it).

ImageImageImage
by ruda
Mon 09 May 2022 12:24
Forum: Entity Developer
Topic: Efml Associations - Repeat Bug
Replies: 2
Views: 11429

Re: Efml Associations - Repeat Bug

Thanks for the support.
by ruda
Mon 02 May 2022 13:24
Forum: Entity Developer
Topic: Efml Update from database, column NEXT VALUE
Replies: 4
Views: 13885

Efml Update from database, column NEXT VALUE

Version: 6.12.1419

I detected a problem, to occur was like this:

I have a table with a column that has a string. Not the Identity column.

The default field contains the value: NEXT VALUE FOR [dbo].[sqTable]

When updating the model, it correctly identifies and puts the Generated Value as OnAdd and my Model setting sets it to private.

All right. The problem is that it always updates this field when I try to update the model from the database.

In the description of the database update, the field always appears: Identity(old='True', new='False') was changed.

This makes it difficult to really know what was modified in the database, having to go table by table in the listing to verify.
by ruda
Mon 02 May 2022 13:18
Forum: Entity Developer
Topic: Efml Associations - Repeat Bug
Replies: 2
Views: 11429

Efml Associations - Repeat Bug

Version: 6.12.1419

I detected a problem, to occur was like this:

I have a table A that has two fields that reference table B.
But by mistake I created the two references in table A for the same field that is
FK_TableA_TableB (TableBId = TableBId)
FK_TableA_TableB_Another (TableBId = TableBId)

I updated the model by the database and it created the two references, so far so good. But I think it should alert for two references to the same fields, duplicating the property.

But the problem is when I make the correction:

FK_TableA_TableB (TableBId = TableBId)
FK_TableA_TableB_Another (TableBId_Another = TableBId)

When updating the model by the database it created the reference as it should but did not remove the reference that was duplicated.

So in the model it was 3, and in the database there are two.

Another thing as a suggestion would be the name of the associations to be the name of the FK, which is much easier to find.
by ruda
Mon 19 Apr 2021 23:02
Forum: Entity Developer
Topic: Mapping of multiple nested Complex Type properties
Replies: 3
Views: 6696

Re: Mapping of multiple nested Complex Type properties

Same problem.
And it also occurs when you have multiple ComplexType (the same), it ends up choosing the wrong one.
by ruda
Tue 08 Apr 2014 13:56
Forum: Entity Developer
Topic: NHibernate IUserType (type and definition)
Replies: 1
Views: 3185

NHibernate IUserType (type and definition)

NHibernate lets you create a IUserType a ready class. For example, create a IUserType to System.Uri.

Then create a class called the project UriType Implementing IUserType and setting the type as System.Uri.

On the property in the class it is the type System.Uri, but the Type of NHibernate is UriType type. Works perfectly, but I have no way to define the two Entity Developer. If I define UriType he puts on the property UriType, but should be the System.Uri.

How do I set the property type and the type of nhibernate?

Code: Select all

Map(x => x.Test)    
                .Column("Test")
                .CustomType("NhibernateExt.UriType")
                .Access.Property()
                .Generated.Never()
                .CustomSqlType("varchar")
                .Length(100);

public virtual System.Uri Test
        {
            get;
            set;
        }