|
-
Nov 17th, 2012, 04:12 PM
#1
Thread Starter
Hyperactive Member
nHibernate - Ensure data in different tables stored with different Id's
Hi,
Got a problem after a file uploading function have been abused and now must figure out a solution on my side.
In a nutshell, I have 5 different tables, not related to each other and my only solution is now to make sure no two records in those tables can have the same id.
I’m using nHibernate (code mappings, not fluent) so guess if this is even possible I’d have to do some configuration in there).
For those curious: I store images in a different table. One table for any images. You store an image by passing in the image, its id (in one of the above tables) and the image type.
However the jnr. developer created a mobile app that save all images with the same type and the mobile app cannot be changed.
Now my only work around is to make sure my api does not save objects by the same id, so I can be sure when I retrieve a certain image type by this or that id, I won’t get images for records in different tables.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|