tbrittain / SmbExplorerCompanion

Baseball-Reference style desktop application for Super Mega Baseball 4 franchise playthroughs
MIT License
2 stars 0 forks source link

Exported leagues from franchise reset season IDs #87

Closed tbrittain closed 12 months ago

tbrittain commented 12 months ago

When a player exports a franchise to a new league and then starts a new franchise with that newly exported league, the Season IDs reset back to 1 for the initial season. This will cause conflicts with the original franchise's seasons

tbrittain commented 12 months ago

If we want to have the ability to import mid season data (#2) then we need to resolve this through some more interesting measures. This is a problem because the Season ID will be the same value on all of the CSVs. We may need to add a combo box on the import page that allows a user to select a season to import for (which would allow reimporting), but also create the Season entity prior to the CSV imports occurring, which we can then just pass in to all of the import methods to use, so that this is a more explicit process

tbrittain commented 12 months ago

This creation of the new season should ONLY occur if the user decides to import data for that season though, otherwise it could throw off lots of other methods that rely on pulling data for the most recent season. So what we should probably do is allow the user to create a new season for that combo box item, but not a database entity, as we can have the ID as the default int (0), and then in the CSV import methods check if that is the default and then create the season for it, so that we are still performing the data insertion atomically