[Modeling-users] multiplicity constraints, [1,1]
Status: Abandoned
Brought to you by:
sbigaret
|
From: Mario R. <ma...@ru...> - 2003-11-13 08:18:18
|
Hi,
I have associations where a row of one entity should
always be related to 1 and only 1 row of another entity,
like so:
model.entities = [
Entity('A', ...),
Entity('B', ...),
]
model.associations=[
# A is always related to a B
Association('A','B',
relations=['b','as'],
multiplicity=[ [1,1], [0,None] ],
delete=['nullify','deny'],
keys=['fkBId','id'],
),
]
However, if i create a row A and not relate it to any B,
saveChanges on the EC is successful, and the "fkBId"
value is NULL (running this with SQLite). I was expecting
that the framework will will throw up on this.
Am I misunderstanding something here?
Cheers, mario
|