Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9080617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:06:48+00:00 2026-06-16T20:06:48+00:00

The application I have uses localization. The way it is built, is that it

  • 0

The application I have uses localization. The way it is built, is that it examines an entity (traversing down the structure) and translates every property marked as ‘translate’.

The translations are stored in separate translation tables.

This is all fine but it leaves me with the problem that I now get the translated values in my ‘default’ values when I update the entity using the translations. And I don’t want that.

Let me try and explain better.

Database:enter image description here

The mapping of footprintlinevLue:

public class FootprintLineValueMap : ClassMap<FootprintLineValue> {
 public FootprintLineValueMap() {
    Table("FootprintLineValue");

    Id(x => x.Id).GeneratedBy.Identity().Column("Id");
    References(x => x.FootprintLine).Column("FootprintLineId");
    References(x => x.CategoryValue).Column("CategoryValueId").Cascade.None();

  }

As you can see a footprintline has multiple values that reference a categoryValue. The categoryvalue is localized.

When I now retrieve footprintlines our framework will put it through our translationservice and will automatically translate the Name and Description of the CategoryValue in the corresponding culture. If it cant find a translation in CategoryValueLocal, it will use the default in CategoryValue.

However…if I save a Footprintline, it will save the translated values back into CategoryValue (overwriting the default) instead of ignore it.

CategoryValues are not value objects and could be changed so I cant make them readonly.
I tried to map the reference as Cascade.None, but that doesn’t seem to do anything.

I hope there is a way to simply mark this in the mapping so we can keep on using our TranslationService instead of having to figure out another way to hande localization.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:06:50+00:00Added an answer on June 16, 2026 at 8:06 pm

    mark the properties as not updateable.

    Map(x => x.Description).Not.Update();
    

    you could even define a convention to do so

    class TranslatedPropertiesConvention : AttributePropertyConvention<Translated>
    {
        public void Apply(FluentNHibernate.Conventions.Instances.IPropertyInstance instance)
        {
            instance.Not.Update();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that uses localization to show either English or French
I have a multi-language windows application that uses standard .net localization in resx files.
I have an application which uses the microsoft kinect device. The thing is that
I have an application which uses code that produces various types of objects and
I have an application that uses a ResourceDictionary to set the styles, which it
I have an application that uses Hibernate. It generated the following SQL statement. I
I have an application that uses multiple WebViews. Nowhere do I set the priority
I have an application that uses RPC for interprocess communications. Turns out that synchronous
I have an application that uses rest to communicate to a server, i would
I have an application that uses CoreData. I previously had a class named Marker

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.