Starts in:
1 DAY
16 HRS
49 MIN
29 SEC
Starts in:
1 D
16 H
49 M
29 S

Activities of "Neozzz"

Hi,

the microservice template has gotten better by leaps and bounds since the last time I raised this issue. Now we can add a service to a microservice solution by using:

abp new OrderService -t microservice-service-pro

This creates a solution with efcore.

Do we have a similar command, say:

abp new ProductService -t microservice-service-pro -d mongodb

That allows us to add a service that uses mongodb for storing its domain entities? This service will be using the efcore backing given by the microservice for identity, admin, saas etc.

The above command is only for reference, it doesn't generate a project with mongodb.

Now to the question.

Is there a command to straight away generate a microservice service that uses mongodb? If not, is there any references that we can check to see how to implement one? Could you please let us know how to achieve this?

Thank you :)

hi @liangshiwei,

I'll share the repo with you. I'll explain the issue via mail or remote; which ever is comfortable for you. Either ways, pls lemme know.

Ty :)

HI albert,

Thank you for the reply. Could you please take a look at this link: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontextoptionsbuilder.usequerytrackingbehavior?view=efcore-3.1

An excerpt from the link:

"Disabling change tracking is useful for read-only scenarios because it avoids the overhead of setting up change tracking for each entity instance. You should not disable change tracking if you want to manipulate entity instances and persist those changes to the database using SaveChanges()."

Without disabling tracking is there a better way to solve this issue? For example, any sample in abp that allows us to change the entity state and then update?

Thank you

@gterdem

idk how replying with with statements like "go to stackoverflow" will warrant any respect to you either. I have had good experiences with your colleagues. Have raised nearly 20 questions here. All have been supportive and very helpful. Unfortunately except you. May be please be self reflective.

I am sorry your colleagues might've asked those questions to you. And your passive aggressive statements doesn't look good on you :)

That being said, we answered tens maybe hundreds of unrelated questions in support when asked properly as something like "Ok, I know this seems related with EfCore since i checked google but can you help me about ..."

Rather than lecturing me on how to beg to you to get asnwers, may be you should emulate the work culture and tenacity shown by your colleagues to the work and learn from them. You could've asked for more info rather than just blurting out "stackoverflow" and closing the ticket just like that.

I am using updateasync from Volo.Abp.Domain.Repositories for updating the record. And when am using something from your own namespace from where else will I get support?

Why should EF Core repo respond to me when I am using abp class when I could be using EF Core directly and not use any abp product at all?

I have faced similar issue with POST but your team mates helped resolve it. And the answer had to do with using repository classes from abp.

as usual useless answer from gterdem. please assign the ticket to someone else.

we're using updateasync from volo.abp namespace. guess thats enough to make it fall under abp.

hi. any updates?

Error: The instance of entity type 'Address' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values. System.InvalidOperationException: The instance of entity type 'Address' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values.

Consider the following domain models:

public class Employee : FullAuditedEntity<Guid>
{
    <<<<properties....>>>
    public ICollection<Contact> Contacts {get;set;}   
}

public class Contact : FullAuditedEntity<Guid>
{
    <<<properties...>>>
    public ICollection<Address> Addresses {get;set;}
}

We're trying to update employee info and the addresses associated with the employee with the put api. However we're getting this error when trying to update Addresses.

we're using individual repos for updating using updateasync and updatemanyasync.

Please let me know what might be the issue.

Thank you

its already there

We're using a non tiered version of the abp project template, In this case will we have a separate log for identity? Or is it enough that i share the logs file? If so, click here to view the application logs. If not, please let me know from where to get it.

Thanks

Showing 41 to 50 of 128 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06