question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(Cannot ?) override column attributes at runtime

See original GitHub issue

If for some reason, you need to change the mapping for a table for one operation only, you can call something like db.GetTable<ModelBase>().TableName('table1'). However, there is no obvious way to do something like db.GetTable<ModelBase>().ColumName(x => x.Id, 'idColumn1'), let alone override things like IsPrimaryKey.

I think an API similar to the one for tables would be nice, but in the meantime, is there any way to do the equivalent now?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Arithmomaniaccommented, Mar 3, 2017

Are you suggesting I use MappingSchema.Default.GetFluentMappingBuilder().Entity<ModelBase>()? Doesn’t that edit the configuration globally? Or is there a way to clone and edit MappingSchemas, and use them for table creation?

0reactions
Arithmomaniaccommented, Mar 8, 2017

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set or change Attribute's properties or fields at runtime in ...
The approach that looks logical is to use another attribute that holds the string, which should be built using the names of the...
Read more >
Hibernate Tips: How to override column mappings of a ...
You can use the @AttributeOverride annotation on the Book entity to override the mapping of each attribute defined by the Publication class. You...
Read more >
Overriding Column Definition With @AttributeOverride
@AttributeOverride's Attributes. The annotation contains two mandatory attributes: name – field name of an included entity; column – column ...
Read more >
Solved: Dynamically changing column attributes in the tabl...
Solved: Hi, I have a table visualization with attributes A,B,C,D and E let's say. ... Since we cant dynamically change the column header...
Read more >
Column attributes refresh - Ignition
Each time when I overwrite data, column attributes remain same (outdated), and update only when I enter table customizer and press ok.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found