Closed ryanjshaw closed 4 years ago
@ryanjshaw sure make a PR to fix this if you want.
As I understand the change is trivial like replacing
SELECT EventIndex, EventData FROM {_tableSchema}.{_tableEvents}
by
SELECT EventIndex, EventData FROM [{_tableSchema}].[{_tableEvents}]
right?
I have found it convenient to use '.' in my actor names, and child actors spawned have a '/' in their name automatically. I also find it convenient to split the state of actors into separate tables for performance and debugging purposes. Unfortunately the characters I mentioned are iirregular identifiers so they must be delimited when used as the table name for persistence.
Currently the SQL in https://github.com/AsynkronIT/protoactor-dotnet/blob/dev/src/PersistenceProviders/Proto.Persistence.SqlServer/SqlServerProvider.cs does not delimit identifiers [1], so only actor names containing regular identifiers [2] will work with the SQL Server persistence driver.
I can workaround it by replacing irregular identifiers but that looks inconsistent with my logs (which include actor names) and increases the risk of a namespace collision.
This is straightforward to fix, happy to do it if there is agreement that it be done?
[1] https://technet.microsoft.com/en-us/library/ms176027%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396 [2] https://technet.microsoft.com/en-us/library/ms175874%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396