I'm learning symphony 3 framework and I ran into a problem that should be basic but I couldn't find a solution yet.
I have an order form, data class is set to the Order object, which is ORM mapped to the according table. I have relations set to User, Product and Payment objects. In my form the user can select product and payment and it would work so far. Only I don't know how to pass the current user object to the form, so it validates. I don't want to put a form field for user in, because it always is the current user object and the user shouldn't be able to see or modify it somehow.
Is there an option besides making the user relation nullable and adding it after form validation and before persisting? Doesn't seem best practice to have this field optional in database.